diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java index 554ec1c15c..d0131cffc2 100644 --- a/core/src/main/java/hudson/ClassicPluginStrategy.java +++ b/core/src/main/java/hudson/ClassicPluginStrategy.java @@ -389,6 +389,7 @@ public class ClassicPluginStrategy implements PluginStrategy { this.dependencies = dependencies; } + @Override protected Class findClass(String name) throws ClassNotFoundException { for (Dependency dep : dependencies) { PluginWrapper p = pluginManager.getPlugin(dep.shortName); diff --git a/core/src/main/java/hudson/CloseProofOutputStream.java b/core/src/main/java/hudson/CloseProofOutputStream.java index 5af94299f6..4256d4ac75 100644 --- a/core/src/main/java/hudson/CloseProofOutputStream.java +++ b/core/src/main/java/hudson/CloseProofOutputStream.java @@ -36,6 +36,7 @@ public class CloseProofOutputStream extends DelegatingOutputStream { super(out); } + @Override public void close() { } } diff --git a/core/src/main/java/hudson/DescriptorExtensionList.java b/core/src/main/java/hudson/DescriptorExtensionList.java index d4bc87db21..fee34db7d2 100644 --- a/core/src/main/java/hudson/DescriptorExtensionList.java +++ b/core/src/main/java/hudson/DescriptorExtensionList.java @@ -29,7 +29,6 @@ import hudson.model.Hudson; import hudson.model.ViewDescriptor; import hudson.model.Descriptor.FormException; import hudson.util.Memoizer; -import hudson.util.Iterators; import hudson.util.Iterators.FlattenIterator; import hudson.slaves.NodeDescriptor; import hudson.tasks.Publisher; diff --git a/core/src/main/java/hudson/ExpressionFactory2.java b/core/src/main/java/hudson/ExpressionFactory2.java index 93c4ed3fe6..be6df295b4 100644 --- a/core/src/main/java/hudson/ExpressionFactory2.java +++ b/core/src/main/java/hudson/ExpressionFactory2.java @@ -54,6 +54,7 @@ final class ExpressionFactory2 implements ExpressionFactory { this.expression = expression; } + @Override public String toString() { return super.toString() + "[" + expression.getExpression() + "]"; } diff --git a/core/src/main/java/hudson/ExtensionList.java b/core/src/main/java/hudson/ExtensionList.java index f3c1849c0d..c9dc69d6dc 100644 --- a/core/src/main/java/hudson/ExtensionList.java +++ b/core/src/main/java/hudson/ExtensionList.java @@ -103,6 +103,7 @@ public class ExtensionList extends AbstractList { return null; } + @Override public Iterator iterator() { // we need to intercept mutation, so for now don't allow Iterator.remove return Iterators.readOnly(ensureLoaded().iterator()); diff --git a/core/src/main/java/hudson/ExtensionListView.java b/core/src/main/java/hudson/ExtensionListView.java index 56917dccba..070aebd237 100644 --- a/core/src/main/java/hudson/ExtensionListView.java +++ b/core/src/main/java/hudson/ExtensionListView.java @@ -61,6 +61,7 @@ public class ExtensionListView { return Hudson.getInstance().getExtensionList(type); } + @Override public Iterator iterator() { return storage().iterator(); } @@ -73,10 +74,12 @@ public class ExtensionListView { return storage().size(); } + @Override public boolean add(T t) { return storage().add(t); } + @Override public void add(int index, T t) { // index ignored storage().add(t); diff --git a/core/src/main/java/hudson/FileSystemProvisioner.java b/core/src/main/java/hudson/FileSystemProvisioner.java index 04b8fcc609..e37f81acd1 100644 --- a/core/src/main/java/hudson/FileSystemProvisioner.java +++ b/core/src/main/java/hudson/FileSystemProvisioner.java @@ -31,7 +31,6 @@ import hudson.model.Describable; import hudson.model.Job; import hudson.model.TaskListener; import hudson.model.Hudson; -import hudson.model.Executor; import hudson.model.listeners.RunListener; import hudson.scm.SCM; @@ -40,7 +39,6 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import java.io.Closeable; /** * Prepares and provisions workspaces for {@link AbstractProject}s. diff --git a/core/src/main/java/hudson/FileSystemProvisionerDescriptor.java b/core/src/main/java/hudson/FileSystemProvisionerDescriptor.java index 15d2e97b89..2cb0506fa9 100644 --- a/core/src/main/java/hudson/FileSystemProvisionerDescriptor.java +++ b/core/src/main/java/hudson/FileSystemProvisionerDescriptor.java @@ -25,7 +25,6 @@ package hudson; import hudson.model.Descriptor; import hudson.model.TaskListener; -import hudson.model.AbstractBuild; import java.io.IOException; diff --git a/core/src/main/java/hudson/LauncherDecorator.java b/core/src/main/java/hudson/LauncherDecorator.java index b1d33b0685..becd81a3ec 100644 --- a/core/src/main/java/hudson/LauncherDecorator.java +++ b/core/src/main/java/hudson/LauncherDecorator.java @@ -2,9 +2,6 @@ package hudson; import hudson.model.Hudson; import hudson.model.Node; -import hudson.model.TaskListener; -import hudson.model.AbstractBuild; -import hudson.model.BuildListener; import hudson.model.Executor; import hudson.tasks.BuildWrapper; diff --git a/core/src/main/java/hudson/MarkupText.java b/core/src/main/java/hudson/MarkupText.java index 619e2a4a8d..572ea162fa 100644 --- a/core/src/main/java/hudson/MarkupText.java +++ b/core/src/main/java/hudson/MarkupText.java @@ -228,6 +228,7 @@ public class MarkupText extends AbstractMarkupText { /** * Returns the fully marked-up text. */ + @Override public String toString() { if(tags.isEmpty()) return text; // the most common case diff --git a/core/src/main/java/hudson/Platform.java b/core/src/main/java/hudson/Platform.java index 5a08bbeb39..757da77a71 100644 --- a/core/src/main/java/hudson/Platform.java +++ b/core/src/main/java/hudson/Platform.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson; import java.io.File; diff --git a/core/src/main/java/hudson/PluginWrapper.java b/core/src/main/java/hudson/PluginWrapper.java index a53e7c3f3d..1a47d90b63 100644 --- a/core/src/main/java/hudson/PluginWrapper.java +++ b/core/src/main/java/hudson/PluginWrapper.java @@ -102,14 +102,14 @@ public final class PluginWrapper { */ private final String shortName; - /** + /** * True if this plugin is activated for this session. * The snapshot of disableFile.exists() as of the start up. */ private final boolean active; private final List dependencies; - private final List optionalDependencies; + private final List optionalDependencies; static final class Dependency { public final String shortName; @@ -202,12 +202,12 @@ public final class PluginWrapper { } public List getDependencies() { - return dependencies; - } + return dependencies; + } - public List getOptionalDependencies() { - return optionalDependencies; - } + public List getOptionalDependencies() { + return optionalDependencies; + } /** @@ -326,17 +326,17 @@ public final class PluginWrapper { } public Manifest getManifest() { - return manifest; - } + return manifest; + } - public void setPlugin(Plugin plugin) { - this.plugin = plugin; - plugin.wrapper = this; - } - - public String getPluginClass() { - return manifest.getMainAttributes().getValue("Plugin-Class"); - } + public void setPlugin(Plugin plugin) { + this.plugin = plugin; + plugin.wrapper = this; + } + + public String getPluginClass() { + return manifest.getMainAttributes().getValue("Plugin-Class"); + } /** * If the plugin has {@link #getUpdateInfo() an update}, diff --git a/core/src/main/java/hudson/Proc.java b/core/src/main/java/hudson/Proc.java index 527e606192..cbdbd32a45 100644 --- a/core/src/main/java/hudson/Proc.java +++ b/core/src/main/java/hudson/Proc.java @@ -238,6 +238,7 @@ public abstract class Proc { this.out = out; } + @Override public void run() { try { try { diff --git a/core/src/main/java/hudson/ProxyConfiguration.java b/core/src/main/java/hudson/ProxyConfiguration.java index b6baa4d54b..7fdb96df18 100644 --- a/core/src/main/java/hudson/ProxyConfiguration.java +++ b/core/src/main/java/hudson/ProxyConfiguration.java @@ -112,6 +112,7 @@ public final class ProxyConfiguration implements Saveable { if(p.getUserName()!=null) { // Add an authenticator which provides the credentials for proxy authentication Authenticator.setDefault(new Authenticator() { + @Override public PasswordAuthentication getPasswordAuthentication() { ProxyConfiguration p = Hudson.getInstance().proxy; return new PasswordAuthentication(p.getUserName(), diff --git a/core/src/main/java/hudson/ResponseHeaderFilter.java b/core/src/main/java/hudson/ResponseHeaderFilter.java index 15d8858546..c85bdc2502 100644 --- a/core/src/main/java/hudson/ResponseHeaderFilter.java +++ b/core/src/main/java/hudson/ResponseHeaderFilter.java @@ -28,15 +28,11 @@ import java.util.*; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.net.URLEncoder; /** * This filter allows you to modify headers set by the container or other servlets diff --git a/core/src/main/java/hudson/TcpSlaveAgentListener.java b/core/src/main/java/hudson/TcpSlaveAgentListener.java index 5e29ebb306..4fa6416811 100644 --- a/core/src/main/java/hudson/TcpSlaveAgentListener.java +++ b/core/src/main/java/hudson/TcpSlaveAgentListener.java @@ -33,7 +33,6 @@ import hudson.remoting.Channel.Listener; import hudson.remoting.Channel.Mode; import hudson.cli.CliManagerImpl; import hudson.cli.CliEntryPoint; -import hudson.util.IOException2; import java.io.DataInputStream; import java.io.IOException; @@ -110,6 +109,7 @@ public final class TcpSlaveAgentListener extends Thread { return Hudson.getInstance().getSecretKey(); } + @Override public void run() { try { // the loop eventually terminates when the socket is closed. @@ -150,6 +150,7 @@ public final class TcpSlaveAgentListener extends Thread { } } + @Override public void run() { try { LOGGER.info("Accepted connection #"+id+" from "+s.getRemoteSocketAddress()); @@ -229,6 +230,7 @@ public final class TcpSlaveAgentListener extends Thread { computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log, new Listener() { + @Override public void onClosed(Channel channel, IOException cause) { try { log.close(); diff --git a/core/src/main/java/hudson/UDPBroadcastFragment.java b/core/src/main/java/hudson/UDPBroadcastFragment.java index 5a52fe153a..7e630a15bc 100644 --- a/core/src/main/java/hudson/UDPBroadcastFragment.java +++ b/core/src/main/java/hudson/UDPBroadcastFragment.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson; import hudson.model.Hudson; diff --git a/core/src/main/java/hudson/WebAppMain.java b/core/src/main/java/hudson/WebAppMain.java index 0dcfd80cf9..7ff39fe5d5 100644 --- a/core/src/main/java/hudson/WebAppMain.java +++ b/core/src/main/java/hudson/WebAppMain.java @@ -185,6 +185,7 @@ public final class WebAppMain implements ServletContextListener { context.setAttribute(APP,new HudsonIsLoading()); new Thread("hudson initialization thread") { + @Override public void run() { try { context.setAttribute(APP,new Hudson(home,context)); diff --git a/core/src/main/java/hudson/XmlFile.java b/core/src/main/java/hudson/XmlFile.java index 5a17779dbf..da450cf4cd 100644 --- a/core/src/main/java/hudson/XmlFile.java +++ b/core/src/main/java/hudson/XmlFile.java @@ -179,6 +179,7 @@ public final class XmlFile { file.getParentFile().mkdirs(); } + @Override public String toString() { return file.toString(); } @@ -232,14 +233,17 @@ public final class XmlFile { try { JAXP.newSAXParser().parse(file,new DefaultHandler() { private Locator loc; + @Override public void setDocumentLocator(Locator locator) { this.loc = locator; } + @Override public void startDocument() throws SAXException { attempt(); } + @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { attempt(); // if we still haven't found it at the first start element, diff --git a/core/src/main/java/hudson/matrix/Axis.java b/core/src/main/java/hudson/matrix/Axis.java index 5324081760..5d46e7b37a 100644 --- a/core/src/main/java/hudson/matrix/Axis.java +++ b/core/src/main/java/hudson/matrix/Axis.java @@ -113,6 +113,7 @@ public final class Axis implements Comparable, Iterable { return this.name.compareTo(that.name); } + @Override public String toString() { return new StringBuilder().append(name).append("={").append(Util.join(values,",")).append('}').toString(); } diff --git a/core/src/main/java/hudson/matrix/AxisList.java b/core/src/main/java/hudson/matrix/AxisList.java index 0fc8ce1661..0ee30d2ce0 100644 --- a/core/src/main/java/hudson/matrix/AxisList.java +++ b/core/src/main/java/hudson/matrix/AxisList.java @@ -57,6 +57,7 @@ public class AxisList extends ArrayList { return null; } + @Override public boolean add(Axis axis) { return axis!=null && super.add(axis); } @@ -111,6 +112,7 @@ public class AxisList extends ArrayList { super(xs); } + @Override public boolean canConvert(Class type) { return type==AxisList.class; } diff --git a/core/src/main/java/hudson/matrix/Combination.java b/core/src/main/java/hudson/matrix/Combination.java index d11d41ff85..7ca23e27cc 100644 --- a/core/src/main/java/hudson/matrix/Combination.java +++ b/core/src/main/java/hudson/matrix/Combination.java @@ -175,6 +175,7 @@ public final class Combination extends TreeMap implements Compara return buf.toString(); } + @Override public String toString() { return toString(',','='); } @@ -239,18 +240,22 @@ public final class Combination extends TreeMap implements Compara } // read-only + @Override public void clear() { throw new UnsupportedOperationException(); } + @Override public void putAll(Map map) { throw new UnsupportedOperationException(); } + @Override public String put(String key, String value) { throw new UnsupportedOperationException(); } + @Override public String remove(Object key) { throw new UnsupportedOperationException(); } diff --git a/core/src/main/java/hudson/matrix/MatrixAggregator.java b/core/src/main/java/hudson/matrix/MatrixAggregator.java index e9cb20c615..f82a5919ce 100644 --- a/core/src/main/java/hudson/matrix/MatrixAggregator.java +++ b/core/src/main/java/hudson/matrix/MatrixAggregator.java @@ -25,8 +25,6 @@ package hudson.matrix; import hudson.ExtensionPoint; import hudson.Launcher; -import hudson.model.Action; -import hudson.model.Build; import hudson.model.BuildListener; import hudson.tasks.BuildStep; import hudson.tasks.Publisher; diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java index 1495f991e9..0c0c0f5bf4 100644 --- a/core/src/main/java/hudson/matrix/MatrixBuild.java +++ b/core/src/main/java/hudson/matrix/MatrixBuild.java @@ -132,6 +132,7 @@ public class MatrixBuild extends AbstractBuild { return r; } + @Override public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) { try { MatrixRun item = getRun(Combination.fromString(token)); diff --git a/core/src/main/java/hudson/matrix/MatrixRun.java b/core/src/main/java/hudson/matrix/MatrixRun.java index 1fa7e08cb9..e305aae61e 100644 --- a/core/src/main/java/hudson/matrix/MatrixRun.java +++ b/core/src/main/java/hudson/matrix/MatrixRun.java @@ -57,6 +57,7 @@ public class MatrixRun extends Build { super(project, buildDir); } + @Override public String getUpUrl() { StaplerRequest req = Stapler.getCurrentRequest(); if(req!=null) { @@ -84,6 +85,7 @@ public class MatrixRun extends Build { return getParent().getParent().getBuildByNumber(getNumber()); } + @Override public String getDisplayName() { StaplerRequest req = Stapler.getCurrentRequest(); if(req!=null) { diff --git a/core/src/main/java/hudson/model/BallColor.java b/core/src/main/java/hudson/model/BallColor.java index f36db55eb6..447e8475ec 100644 --- a/core/src/main/java/hudson/model/BallColor.java +++ b/core/src/main/java/hudson/model/BallColor.java @@ -92,6 +92,7 @@ public enum BallColor { /** * Also used as a final name. */ + @Override public String toString() { return name().toLowerCase(Locale.ENGLISH); } diff --git a/core/src/main/java/hudson/model/BooleanParameterDefinition.java b/core/src/main/java/hudson/model/BooleanParameterDefinition.java index 3e7e453868..4ce4db3c8f 100755 --- a/core/src/main/java/hudson/model/BooleanParameterDefinition.java +++ b/core/src/main/java/hudson/model/BooleanParameterDefinition.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson.model; import org.kohsuke.stapler.StaplerRequest; diff --git a/core/src/main/java/hudson/model/Build.java b/core/src/main/java/hudson/model/Build.java index d37570b480..7119f0c5bc 100644 --- a/core/src/main/java/hudson/model/Build.java +++ b/core/src/main/java/hudson/model/Build.java @@ -147,6 +147,7 @@ public abstract class Build

,B extends Build> performAllBuildStep(listener, project.getProperties(),true); } + @Override public void cleanUp(BuildListener listener) throws Exception { performAllBuildStep(listener, project.getPublishers(),false); performAllBuildStep(listener, project.getProperties(),false); diff --git a/core/src/main/java/hudson/model/BuildAuthorizationToken.java b/core/src/main/java/hudson/model/BuildAuthorizationToken.java index 0350ad859a..b1be9d65c8 100644 --- a/core/src/main/java/hudson/model/BuildAuthorizationToken.java +++ b/core/src/main/java/hudson/model/BuildAuthorizationToken.java @@ -84,6 +84,7 @@ public final class BuildAuthorizationToken { return new BuildAuthorizationToken(str); } + @Override protected String toString(Object obj) { return ((BuildAuthorizationToken)obj).token; } diff --git a/core/src/main/java/hudson/model/DescriptorByNameOwner.java b/core/src/main/java/hudson/model/DescriptorByNameOwner.java index 75954c65f3..98aacc0330 100644 --- a/core/src/main/java/hudson/model/DescriptorByNameOwner.java +++ b/core/src/main/java/hudson/model/DescriptorByNameOwner.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson.model; /** diff --git a/core/src/main/java/hudson/model/DownloadService.java b/core/src/main/java/hudson/model/DownloadService.java index c7634ca47c..e9612644b2 100644 --- a/core/src/main/java/hudson/model/DownloadService.java +++ b/core/src/main/java/hudson/model/DownloadService.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson.model; import hudson.Extension; diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index 517324c9a1..7090fe9e5c 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -77,6 +77,7 @@ public class Executor extends Thread implements ModelObject { start(); } + @Override public void run() { // run as the system user. see ACL.SYSTEM for more discussion about why this is somewhat broken SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM); diff --git a/core/src/main/java/hudson/model/Failure.java b/core/src/main/java/hudson/model/Failure.java index 9962dc7a56..2e9a1bf02c 100644 --- a/core/src/main/java/hudson/model/Failure.java +++ b/core/src/main/java/hudson/model/Failure.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson.model; import org.kohsuke.stapler.HttpResponse; diff --git a/core/src/main/java/hudson/model/FileParameterValue.java b/core/src/main/java/hudson/model/FileParameterValue.java index 43f308ba3a..5ae205bdb0 100644 --- a/core/src/main/java/hudson/model/FileParameterValue.java +++ b/core/src/main/java/hudson/model/FileParameterValue.java @@ -64,6 +64,7 @@ public class FileParameterValue extends ParameterValue { this.location = location; } + @Override public BuildWrapper createBuildWrapper(AbstractBuild build) { return new BuildWrapper() { public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { @@ -106,7 +107,7 @@ public class FileParameterValue extends ParameterValue { return true; } - @Override + @Override public String getShortDescription() { return "(FileParameterValue) " + getName() + "='" + file.getName() + "'"; } diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index 90d9d83e4d..fe39383eeb 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -213,6 +213,7 @@ public class Fingerprint implements ModelObject, Saveable { return this.end==that.start; } + @Override public String toString() { return "["+start+","+end+")"; } @@ -400,6 +401,7 @@ public class Fingerprint implements ModelObject, Saveable { this.ranges.addAll(that.ranges.subList(rhs,that.ranges.size())); } + @Override public synchronized String toString() { StringBuffer buf = new StringBuffer(); for (Range r : ranges) { @@ -759,6 +761,7 @@ public class Fingerprint implements ModelObject, Saveable { XSTREAM.registerConverter(new HexBinaryConverter(),10); XSTREAM.registerConverter(new RangeSet.ConverterImpl( new CollectionConverter(XSTREAM.getClassMapper()) { + @Override protected Object createCollection(Class type) { return new ArrayList(); } diff --git a/core/src/main/java/hudson/model/FoldableAction.java b/core/src/main/java/hudson/model/FoldableAction.java index 175056135c..6e822fab97 100644 --- a/core/src/main/java/hudson/model/FoldableAction.java +++ b/core/src/main/java/hudson/model/FoldableAction.java @@ -1,3 +1,26 @@ +/* + * The MIT License + * + * Copyright (c) 2004-2009, Sun Microsystems, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package hudson.model; import hudson.model.Queue.Task; @@ -11,5 +34,5 @@ import java.util.List; * be a duplicate of a build already in the build queue. */ public interface FoldableAction extends Action { - public void foldIntoExisting(Task t, List actions); + public void foldIntoExisting(Task t, List actions); } diff --git a/core/src/main/java/hudson/model/FreeStyleProject.java b/core/src/main/java/hudson/model/FreeStyleProject.java index b368ca4a8b..2e34c1a9dd 100644 --- a/core/src/main/java/hudson/model/FreeStyleProject.java +++ b/core/src/main/java/hudson/model/FreeStyleProject.java @@ -23,7 +23,6 @@ */ package hudson.model; -import hudson.FilePath; import hudson.Extension; import java.io.File; @@ -84,6 +83,7 @@ public class FreeStyleProject extends Project i save(); } + @Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException { if(req.hasParameter("customWorkspace")) customWorkspace = req.getParameter("customWorkspace.directory"); diff --git a/core/src/main/java/hudson/model/JobPropertyDescriptor.java b/core/src/main/java/hudson/model/JobPropertyDescriptor.java index 861db48887..0000f05eb1 100644 --- a/core/src/main/java/hudson/model/JobPropertyDescriptor.java +++ b/core/src/main/java/hudson/model/JobPropertyDescriptor.java @@ -61,6 +61,7 @@ public abstract class JobPropertyDescriptor extends Descriptor> { * @return * null to avoid setting an instance of {@link JobProperty} to the target project. */ + @Override public JobProperty newInstance(StaplerRequest req, JSONObject formData) throws FormException { // JobPropertyDescriptors are bit different in that we allow them even without any user-visible configuration parameter, // so replace the lack of form data by an empty one. diff --git a/core/src/main/java/hudson/model/Label.java b/core/src/main/java/hudson/model/Label.java index 286c03c391..2cf0d8b284 100644 --- a/core/src/main/java/hudson/model/Label.java +++ b/core/src/main/java/hudson/model/Label.java @@ -297,6 +297,7 @@ public class Label implements Comparable