提交 2044de52 编写于 作者: C Christoph Kutzinski

- removed unused fields

- suppressed/fixed several compiler warnings
上级 b3512b60
......@@ -28,7 +28,6 @@
package hudson.model;
import hudson.Functions;
import java.util.regex.Pattern;
import antlr.ANTLRException;
import hudson.AbortException;
import hudson.CopyOnWrite;
......@@ -124,6 +123,7 @@ import static javax.servlet.http.HttpServletResponse.*;
* @author Kohsuke Kawaguchi
* @see AbstractBuild
*/
@SuppressWarnings("rawtypes")
public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>> extends Job<P,R> implements BuildableItem {
/**
......@@ -780,6 +780,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* For the convenience of the caller, this collection can contain null, and those will be silently ignored.
* @since 1.383
*/
@SuppressWarnings("unchecked")
public Future<R> scheduleBuild2(int quietPeriod, Cause c, Collection<? extends Action> actions) {
if (!isBuildable())
return null;
......@@ -795,7 +796,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
WaitingItem i = Jenkins.getInstance().getQueue().schedule(this, quietPeriod, queueActions);
if(i!=null)
return (Future)i.getFuture();
return (Future<R>)i.getFuture();
return null;
}
......@@ -829,6 +830,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* Production code shouldn't be using this, but for tests this is very convenient, so this isn't marked
* as deprecated.
*/
@SuppressWarnings("deprecation")
public Future<R> scheduleBuild2(int quietPeriod) {
return scheduleBuild2(quietPeriod, new LegacyCodeCause());
}
......@@ -1419,6 +1421,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
}
@SuppressWarnings("unchecked")
public synchronized Map<TriggerDescriptor,Trigger> getTriggers() {
return (Map)Descriptor.toMap(triggers);
}
......@@ -1941,14 +1944,13 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
static class AutoCompleteSeeder {
private String source;
private Pattern quoteMatcher = Pattern.compile("(\\\"?)(.+?)(\\\"?+)(\\s*)");
AutoCompleteSeeder(String source) {
this.source = source;
}
List<String> getSeeds() {
ArrayList<String> terms = new ArrayList();
ArrayList<String> terms = new ArrayList<String>();
boolean trailingQuote = source.endsWith("\"");
boolean leadingQuote = source.startsWith("\"");
boolean trailingSpace = source.endsWith(" ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册