diff --git a/cli/src/main/java/hudson/cli/CLI.java b/cli/src/main/java/hudson/cli/CLI.java index 6b6f37e414..de2d2bd795 100644 --- a/cli/src/main/java/hudson/cli/CLI.java +++ b/cli/src/main/java/hudson/cli/CLI.java @@ -97,6 +97,7 @@ public class CLI { * @deprecated * Use {@link CLIConnectionFactory} to create {@link CLI} */ + @Deprecated public CLI(URL jenkins, ExecutorService exec) throws IOException, InterruptedException { this(jenkins,exec,null); } @@ -105,6 +106,7 @@ public class CLI { * @deprecated * Use {@link CLIConnectionFactory} to create {@link CLI} */ + @Deprecated public CLI(URL jenkins, ExecutorService exec, String httpsProxyTunnel) throws IOException, InterruptedException { this(new CLIConnectionFactory().url(jenkins).executorService(exec).httpsProxyTunnel(httpsProxyTunnel)); } diff --git a/core/src/main/java/hudson/DescriptorExtensionList.java b/core/src/main/java/hudson/DescriptorExtensionList.java index e4b9a3e9fc..513c557d44 100644 --- a/core/src/main/java/hudson/DescriptorExtensionList.java +++ b/core/src/main/java/hudson/DescriptorExtensionList.java @@ -81,6 +81,7 @@ public class DescriptorExtensionList, D extends Descrip * @deprecated as of 1.416 * Use {@link #create(Jenkins, Class)} */ + @Deprecated public static ,D extends Descriptor> DescriptorExtensionList createDescriptorList(Hudson hudson, Class describableType) { return (DescriptorExtensionList)createDescriptorList((Jenkins)hudson,describableType); @@ -95,6 +96,7 @@ public class DescriptorExtensionList, D extends Descrip * @deprecated as of 1.416 * Use {@link #DescriptorExtensionList(Jenkins, Class)} */ + @Deprecated protected DescriptorExtensionList(Hudson hudson, Class describableType) { this((Jenkins)hudson,describableType); } diff --git a/core/src/main/java/hudson/ExtensionFinder.java b/core/src/main/java/hudson/ExtensionFinder.java index d4dc1ef31b..4f0719da59 100644 --- a/core/src/main/java/hudson/ExtensionFinder.java +++ b/core/src/main/java/hudson/ExtensionFinder.java @@ -85,6 +85,7 @@ public abstract class ExtensionFinder implements ExtensionPoint { * Use and implement {@link #find(Class,Hudson)} that allows us to put some metadata. */ @Restricted(NoExternalUse.class) + @Deprecated public Collection findExtensions(Class type, Hudson hudson) { return Collections.emptyList(); } diff --git a/core/src/main/java/hudson/ExtensionList.java b/core/src/main/java/hudson/ExtensionList.java index 7861de26c2..4d59d1f927 100644 --- a/core/src/main/java/hudson/ExtensionList.java +++ b/core/src/main/java/hudson/ExtensionList.java @@ -73,6 +73,7 @@ public class ExtensionList extends AbstractList { * @deprecated as of 1.417 * Use {@link #jenkins} */ + @Deprecated public final Hudson hudson; public final @CheckForNull Jenkins jenkins; public final Class extensionType; @@ -93,6 +94,7 @@ public class ExtensionList extends AbstractList { * @deprecated as of 1.416 * Use {@link #ExtensionList(Jenkins, Class)} */ + @Deprecated protected ExtensionList(Hudson hudson, Class extensionType) { this((Jenkins)hudson,extensionType); } @@ -105,6 +107,7 @@ public class ExtensionList extends AbstractList { * @deprecated as of 1.416 * Use {@link #ExtensionList(Jenkins, Class, CopyOnWriteArrayList)} */ + @Deprecated protected ExtensionList(Hudson hudson, Class extensionType, CopyOnWriteArrayList> legacyStore) { this((Jenkins)hudson,extensionType,legacyStore); } @@ -214,6 +217,7 @@ public class ExtensionList extends AbstractList { * Prefer automatic registration. */ @Override + @Deprecated public synchronized boolean add(T t) { legacyInstances.add(new ExtensionComponent(t)); // if we've already filled extensions, add it @@ -325,6 +329,7 @@ public class ExtensionList extends AbstractList { * @deprecated as of 1.416 * Use {@link #create(Jenkins, Class)} */ + @Deprecated public static ExtensionList create(Hudson hudson, Class type) { return create((Jenkins)hudson,type); } diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 6660dff7e2..7a75f27d05 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -367,6 +367,7 @@ public final class FilePath implements Serializable { * * @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name. */ + @Deprecated public void createZipArchive(OutputStream os) throws IOException, InterruptedException { zip(os); } @@ -411,6 +412,7 @@ public final class FilePath implements Serializable { * @deprecated as of 1.315 * Use {@link #zip(OutputStream,String)} that has more consistent name. */ + @Deprecated public void createZipArchive(OutputStream os, final String glob) throws IOException, InterruptedException { archive(ArchiverFactory.ZIP,os,glob); } @@ -2337,6 +2339,7 @@ public final class FilePath implements Serializable { * @see #validateFileMask(FilePath, String) * @deprecated use {@link #validateAntFileMask(String, int)} instead */ + @Deprecated public String validateAntFileMask(final String fileMasks) throws IOException, InterruptedException { return validateAntFileMask(fileMasks, Integer.MAX_VALUE); } diff --git a/core/src/main/java/hudson/FileSystemProvisioner.java b/core/src/main/java/hudson/FileSystemProvisioner.java index 58680eb888..15932a1dca 100644 --- a/core/src/main/java/hudson/FileSystemProvisioner.java +++ b/core/src/main/java/hudson/FileSystemProvisioner.java @@ -204,6 +204,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab /** * @deprecated as of 1.350 */ + @Deprecated public WorkspaceSnapshot snapshot(AbstractBuild build, FilePath ws, TaskListener listener) throws IOException, InterruptedException { return snapshot(build, ws, "**/*", listener); } diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index c6f473be4f..f3571bb8c7 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -438,6 +438,7 @@ public class Functions { * JEXL now supports the real ternary operator "x?y:z", so this work around * is no longer necessary. */ + @Deprecated public static Object ifThenElse(boolean cond, Object thenValue, Object elseValue) { return cond ? thenValue : elseValue; } @@ -1573,6 +1574,7 @@ public class Functions { * @deprecated * Use {@link #calcCheckUrl} */ + @Deprecated public String getCheckUrl(String userDefined, Object descriptor, String field) { if(userDefined!=null || field==null) return userDefined; if (descriptor instanceof Descriptor) { @@ -1823,6 +1825,7 @@ public class Functions { * @deprecated as of 1.451 * Use {@link #getAvatar} */ + @Deprecated public String getUserAvatar(User user, String avatarSize) { return getAvatar(user,avatarSize); } diff --git a/core/src/main/java/hudson/Launcher.java b/core/src/main/java/hudson/Launcher.java index be003dfb64..974fc2cba7 100644 --- a/core/src/main/java/hudson/Launcher.java +++ b/core/src/main/java/hudson/Launcher.java @@ -133,6 +133,7 @@ public abstract class Launcher { * figure out the current {@link Computer} from within a build, use * {@link Computer#currentComputer()} */ + @Deprecated public Computer getComputer() { for( Computer c : Jenkins.getInstance().getComputers() ) if(c.getChannel()==channel) @@ -412,6 +413,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String cmd, Map env, OutputStream out, FilePath workDir) throws IOException { return launch(cmd,Util.mapToEnv(env),out,workDir); } @@ -420,6 +422,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, Map env, OutputStream out, FilePath workDir) throws IOException { return launch(cmd, Util.mapToEnv(env), out, workDir); } @@ -428,6 +431,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, Map env, InputStream in, OutputStream out) throws IOException { return launch(cmd, Util.mapToEnv(env), in, out); } @@ -449,6 +453,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, boolean[] mask, Map env, OutputStream out, FilePath workDir) throws IOException { return launch(cmd, mask, Util.mapToEnv(env), out, workDir); } @@ -470,6 +475,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, boolean[] mask, Map env, InputStream in, OutputStream out) throws IOException { return launch(cmd, mask, Util.mapToEnv(env), in, out); } @@ -478,6 +484,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String cmd,String[] env,OutputStream out, FilePath workDir) throws IOException { return launch(Util.tokenize(cmd),env,out,workDir); } @@ -486,6 +493,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, String[] env, OutputStream out, FilePath workDir) throws IOException { return launch(cmd, env, null, out, workDir); } @@ -494,6 +502,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, String[] env, InputStream in, OutputStream out) throws IOException { return launch(cmd, env, in, out, null); } @@ -515,6 +524,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, boolean[] mask, String[] env, OutputStream out, FilePath workDir) throws IOException { return launch(cmd, mask, env, null, out, workDir); } @@ -536,6 +546,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public final Proc launch(String[] cmd, boolean[] mask, String[] env, InputStream in, OutputStream out) throws IOException { return launch(cmd, mask, env, in, out, null); } @@ -554,6 +565,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public Proc launch(String[] cmd, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException { return launch(launch().cmds(cmd).envs(env).stdin(in).stdout(out).pwd(workDir)); } @@ -576,6 +588,7 @@ public abstract class Launcher { * @deprecated as of 1.311 * Use {@link #launch()} and its associated builder pattern */ + @Deprecated public Proc launch(String[] cmd, boolean[] mask, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException { return launch(launch().cmds(cmd).masks(mask).envs(env).stdin(in).stdout(out).pwd(workDir)); } diff --git a/core/src/main/java/hudson/MarkupText.java b/core/src/main/java/hudson/MarkupText.java index 4a56b1eb60..5240cd3bdf 100644 --- a/core/src/main/java/hudson/MarkupText.java +++ b/core/src/main/java/hudson/MarkupText.java @@ -283,6 +283,7 @@ public class MarkupText extends AbstractMarkupText { * Use {@link #toString(boolean)} to be explicit about the escape mode. */ @Override + @Deprecated public String toString() { return toString(false); } diff --git a/core/src/main/java/hudson/Plugin.java b/core/src/main/java/hudson/Plugin.java index 1e11d23bcd..4808f208ed 100644 --- a/core/src/main/java/hudson/Plugin.java +++ b/core/src/main/java/hudson/Plugin.java @@ -164,6 +164,7 @@ public abstract class Plugin implements Saveable { * @since 1.233 * @deprecated as of 1.305 override {@link #configure(StaplerRequest,JSONObject)} instead */ + @Deprecated public void configure(JSONObject formData) throws IOException, ServletException, FormException { } diff --git a/core/src/main/java/hudson/PluginManager.java b/core/src/main/java/hudson/PluginManager.java index 35f1d9ebbb..443716eed5 100644 --- a/core/src/main/java/hudson/PluginManager.java +++ b/core/src/main/java/hudson/PluginManager.java @@ -151,6 +151,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas * {@link PluginManager} can now live longer than {@link jenkins.model.Jenkins} instance, so * use {@code Hudson.getInstance().servletContext} instead. */ + @Deprecated public final ServletContext context; /** diff --git a/core/src/main/java/hudson/Proc.java b/core/src/main/java/hudson/Proc.java index 5114cbd2c4..598fbca374 100644 --- a/core/src/main/java/hudson/Proc.java +++ b/core/src/main/java/hudson/Proc.java @@ -431,6 +431,7 @@ public abstract class Proc { * * @deprecated as of 1.399. Replaced by {@link Launcher.RemoteLauncher.ProcImpl} */ + @Deprecated public static final class RemoteProc extends Proc { private final Future process; diff --git a/core/src/main/java/hudson/ProxyConfiguration.java b/core/src/main/java/hudson/ProxyConfiguration.java index 0e36a4cd9d..9b51990925 100644 --- a/core/src/main/java/hudson/ProxyConfiguration.java +++ b/core/src/main/java/hudson/ProxyConfiguration.java @@ -165,6 +165,7 @@ public final class ProxyConfiguration extends AbstractDescribableImpl,R extends Abs * @deprecated as of 1.467 * Please use {@link hudson.model.Run.RunExecution} */ + @Deprecated public abstract class AbstractRunner extends AbstractBuildExecution { } @@ -691,6 +692,7 @@ public abstract class AbstractBuild

,R extends Abs * @deprecated as of 1.356 * Use {@link #performAllBuildSteps(BuildListener, Map, boolean)} */ + @Deprecated protected final void performAllBuildStep(BuildListener listener, Map buildSteps, boolean phase) throws InterruptedException, IOException { performAllBuildSteps(listener,buildSteps.values(),phase); } @@ -703,6 +705,7 @@ public abstract class AbstractBuild

,R extends Abs * @deprecated as of 1.356 * Use {@link #performAllBuildSteps(BuildListener, Iterable, boolean)} */ + @Deprecated protected final void performAllBuildStep(BuildListener listener, Iterable buildSteps, boolean phase) throws InterruptedException, IOException { performAllBuildSteps(listener,buildSteps,phase); } @@ -1051,6 +1054,7 @@ public abstract class AbstractBuild

,R extends Abs /** * @deprecated Use {@link #getAction(Class)} on {@link AbstractTestResultAction}. */ + @Deprecated public Action getTestResultAction() { try { return getAction(Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.tasks.test.AbstractTestResultAction").asSubclass(Action.class)); @@ -1062,6 +1066,7 @@ public abstract class AbstractBuild

,R extends Abs /** * @deprecated Use {@link #getAction(Class)} on {@link AggregatedTestResultAction}. */ + @Deprecated public Action getAggregatedTestResultAction() { try { return getAction(Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.tasks.test.AggregatedTestResultAction").asSubclass(Action.class)); @@ -1340,6 +1345,7 @@ public abstract class AbstractBuild

,R extends Abs * @deprecated as of 1.489 * Use {@link #doStop()} */ + @Deprecated public void doStop(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { doStop().generateResponse(req,rsp,this); } diff --git a/core/src/main/java/hudson/model/AbstractCIBase.java b/core/src/main/java/hudson/model/AbstractCIBase.java index 7ec248a15b..cf487105c2 100644 --- a/core/src/main/java/hudson/model/AbstractCIBase.java +++ b/core/src/main/java/hudson/model/AbstractCIBase.java @@ -61,8 +61,9 @@ public abstract class AbstractCIBase extends Node implements ItemGroup,R extends A * If you are calling this method to serve a file from the workspace, doing a form validation, etc., then * use {@link #getSomeWorkspace()} */ + @Deprecated public final FilePath getWorkspace() { AbstractBuild b = getBuildForDeprecatedMethods(); return b != null ? b.getWorkspace() : null; @@ -586,6 +587,7 @@ public abstract class AbstractProject

,R extends A * @deprecated as of 1.319 * See {@link #getWorkspace()} for a migration strategy. */ + @Deprecated public FilePath getModuleRoot() { AbstractBuild b = getBuildForDeprecatedMethods(); return b != null ? b.getModuleRoot() : null; @@ -601,6 +603,7 @@ public abstract class AbstractProject

,R extends A * @deprecated as of 1.319 * See {@link #getWorkspace()} for a migration strategy. */ + @Deprecated public FilePath[] getModuleRoots() { AbstractBuild b = getBuildForDeprecatedMethods(); return b != null ? b.getModuleRoots() : null; @@ -797,6 +800,7 @@ public abstract class AbstractProject

,R extends A * @deprecated * Use {@link #scheduleBuild(Cause)}. Since 1.283 */ + @Deprecated public boolean scheduleBuild() { return getParameterizedJobMixIn().scheduleBuild(); } @@ -805,6 +809,7 @@ public abstract class AbstractProject

,R extends A * @deprecated * Use {@link #scheduleBuild(int, Cause)}. Since 1.283 */ + @Deprecated public boolean scheduleBuild(int quietPeriod) { return getParameterizedJobMixIn().scheduleBuild(quietPeriod); } @@ -1226,6 +1231,7 @@ public abstract class AbstractProject

,R extends A * If you need to lock a workspace while you do some computation, see the source code of * {@link #pollSCMChanges(TaskListener)} for how to obtain a lock of a workspace through {@link WorkspaceList}. */ + @Deprecated public Resource getWorkspaceResource() { return new Resource(getFullDisplayName()+" workspace"); } @@ -1299,6 +1305,7 @@ public abstract class AbstractProject

,R extends A * @deprecated as of 1.346 * Use {@link #poll(TaskListener)} instead. */ + @Deprecated public boolean pollSCMChanges( TaskListener listener ) { return poll(listener).hasChanges(); } @@ -1756,6 +1763,7 @@ public abstract class AbstractProject

,R extends A * @deprecated as of 1.489 * Inject {@link TimeDuration}. */ + @Deprecated public int getDelay(StaplerRequest req) throws ServletException { String delay = req.getParameter("delay"); if (delay==null) return getQuietPeriod(); @@ -1872,6 +1880,7 @@ public abstract class AbstractProject

,R extends A * @deprecated * As of 1.261. Use {@link #buildDescribable(StaplerRequest, List)} instead. */ + @Deprecated protected final > List buildDescribable(StaplerRequest req, List> descriptors, String prefix) throws FormException, ServletException { return buildDescribable(req,descriptors); } @@ -2219,6 +2228,7 @@ public abstract class AbstractProject

,R extends A /** * @deprecated Just use {@link #CANCEL}. */ + @Deprecated public static final Permission ABORT = CANCEL; /** diff --git a/core/src/main/java/hudson/model/Build.java b/core/src/main/java/hudson/model/Build.java index 4a2d75fabd..a5dbcfcf1f 100644 --- a/core/src/main/java/hudson/model/Build.java +++ b/core/src/main/java/hudson/model/Build.java @@ -119,6 +119,7 @@ public abstract class Build

,B extends Build> * proper execution object. */ @Restricted(NoExternalUse.class) + @Deprecated protected Runner createRunner() { return new BuildExecution(); } @@ -127,6 +128,7 @@ public abstract class Build

,B extends Build> * @deprecated as of 1.467 * Please use {@link BuildExecution} */ + @Deprecated protected class RunnerImpl extends BuildExecution { } diff --git a/core/src/main/java/hudson/model/BuildAuthorizationToken.java b/core/src/main/java/hudson/model/BuildAuthorizationToken.java index 7ab272afda..8aa53eb429 100644 --- a/core/src/main/java/hudson/model/BuildAuthorizationToken.java +++ b/core/src/main/java/hudson/model/BuildAuthorizationToken.java @@ -45,6 +45,7 @@ import org.kohsuke.stapler.HttpResponses; * Use {@link ACL} and {@link Item#BUILD}. This code is only here * for the backward compatibility. */ +@Deprecated public final class BuildAuthorizationToken { private final String token; diff --git a/core/src/main/java/hudson/model/BuildableItem.java b/core/src/main/java/hudson/model/BuildableItem.java index 17956d175b..ef845e1175 100644 --- a/core/src/main/java/hudson/model/BuildableItem.java +++ b/core/src/main/java/hudson/model/BuildableItem.java @@ -39,12 +39,14 @@ public interface BuildableItem extends Item, Task { * @deprecated * Use {@link #scheduleBuild(Cause)}. Since 1.283 */ + @Deprecated boolean scheduleBuild(); boolean scheduleBuild(Cause c); /** * @deprecated * Use {@link #scheduleBuild(int, Cause)}. Since 1.283 */ + @Deprecated boolean scheduleBuild(int quietPeriod); boolean scheduleBuild(int quietPeriod, Cause c); } diff --git a/core/src/main/java/hudson/model/Cause.java b/core/src/main/java/hudson/model/Cause.java index 37dbcee4ca..2ee6ba7982 100644 --- a/core/src/main/java/hudson/model/Cause.java +++ b/core/src/main/java/hudson/model/Cause.java @@ -124,6 +124,7 @@ public abstract class Cause { * Fall back implementation when no other type is available. * @deprecated since 2009-02-08 */ + @Deprecated public static class LegacyCodeCause extends Cause { private StackTraceElement [] stackTrace; public LegacyCodeCause() { @@ -162,6 +163,7 @@ public abstract class Cause { * @deprecated since 2009-02-28 */ // for backward bytecode compatibility + @Deprecated public UpstreamCause(AbstractBuild up) { this((Run)up); } @@ -361,6 +363,7 @@ public abstract class Cause { * @deprecated 1.428 * use {@link UserIdCause} */ + @Deprecated public static class UserCause extends Cause { private String authenticationName; public UserCause() { diff --git a/core/src/main/java/hudson/model/CauseAction.java b/core/src/main/java/hudson/model/CauseAction.java index afe715cef0..252c91c722 100644 --- a/core/src/main/java/hudson/model/CauseAction.java +++ b/core/src/main/java/hudson/model/CauseAction.java @@ -113,6 +113,7 @@ public class CauseAction implements FoldableAction, RunAction2 { * @deprecated as of 1.288 * but left here for backward compatibility. */ + @Deprecated public String getShortDescription() { if(causes.isEmpty()) return "N/A"; return causes.get(0).getShortDescription(); diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index b975e9086b..248f2dbfda 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -378,6 +378,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces /** * @deprecated since 2009-01-06. Use {@link #connect(boolean)} */ + @Deprecated public final void launch() { connect(true); } @@ -477,6 +478,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * @deprecated as of 1.320. * Use {@link #disconnect(OfflineCause)} and specify the cause. */ + @Deprecated public Future disconnect() { recordTermination(); if (Util.isOverridden(Computer.class,getClass(),"disconnect",OfflineCause.class)) @@ -640,6 +642,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * accidentally call this method. */ @Exported + @Deprecated public boolean isTemporarilyOffline() { return temporarilyOffline; } @@ -648,6 +651,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * @deprecated as of 1.320. * Use {@link #setTemporarilyOffline(boolean, OfflineCause)} */ + @Deprecated public void setTemporarilyOffline(boolean temporarilyOffline) { setTemporarilyOffline(temporarilyOffline,null); } @@ -1051,6 +1055,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * @deprecated as of 1.292 * Use {@link #getEnvironment()} instead. */ + @Deprecated public Map getEnvVars() throws IOException, InterruptedException { return getEnvironment(); } diff --git a/core/src/main/java/hudson/model/ComputerSet.java b/core/src/main/java/hudson/model/ComputerSet.java index 9bec52ce5a..40b71fb24e 100644 --- a/core/src/main/java/hudson/model/ComputerSet.java +++ b/core/src/main/java/hudson/model/ComputerSet.java @@ -95,6 +95,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl * @deprecated as of 1.301 * Use {@link #getMonitors()}. */ + @Deprecated public static List get_monitors() { return monitors.toList(); } diff --git a/core/src/main/java/hudson/model/DependecyDeclarer.java b/core/src/main/java/hudson/model/DependecyDeclarer.java index 2693515053..5cd1fe6400 100644 --- a/core/src/main/java/hudson/model/DependecyDeclarer.java +++ b/core/src/main/java/hudson/model/DependecyDeclarer.java @@ -30,4 +30,5 @@ import jenkins.model.DependencyDeclarer; * @deprecated Use {@link DependencyDeclarer} instead. * @since 1.160 */ +@Deprecated public interface DependecyDeclarer extends DependencyDeclarer {} diff --git a/core/src/main/java/hudson/model/Descriptor.java b/core/src/main/java/hudson/model/Descriptor.java index 940b8beab9..f310f18457 100644 --- a/core/src/main/java/hudson/model/Descriptor.java +++ b/core/src/main/java/hudson/model/Descriptor.java @@ -366,6 +366,7 @@ public abstract class Descriptor> implements Saveable { * @deprecated since 1.528 * Use {@link #getCheckMethod(String)} */ + @Deprecated public String getCheckUrl(String fieldName) { return getCheckMethod(fieldName).toCheckUrl(); } @@ -512,6 +513,7 @@ public abstract class Descriptor> implements Saveable { * Implement {@link #newInstance(StaplerRequest, JSONObject)} method instead. * Deprecated as of 1.145. */ + @Deprecated public T newInstance(StaplerRequest req) throws FormException { throw new UnsupportedOperationException(getClass()+" should implement newInstance(StaplerRequest,JSONObject)"); } @@ -684,6 +686,7 @@ public abstract class Descriptor> implements Saveable { * @deprecated * As of 1.239, use {@link #configure(StaplerRequest, JSONObject)}. */ + @Deprecated public boolean configure( StaplerRequest req ) throws FormException { return true; } diff --git a/core/src/main/java/hudson/model/DirectoryBrowserSupport.java b/core/src/main/java/hudson/model/DirectoryBrowserSupport.java index cf803fcdc5..16dacc90a2 100644 --- a/core/src/main/java/hudson/model/DirectoryBrowserSupport.java +++ b/core/src/main/java/hudson/model/DirectoryBrowserSupport.java @@ -75,6 +75,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { * @deprecated as of 1.297 * Use {@link #DirectoryBrowserSupport(ModelObject, FilePath, String, String, boolean)} */ + @Deprecated public DirectoryBrowserSupport(ModelObject owner, String title) { this(owner, (VirtualFile) null, title, null, false); } @@ -147,6 +148,7 @@ public final class DirectoryBrowserSupport implements HttpResponse { * Instead of calling this method explicitly, just return the {@link DirectoryBrowserSupport} object * from the {@code doXYZ} method and let Stapler generate a response for you. */ + @Deprecated public void serveFile(StaplerRequest req, StaplerResponse rsp, FilePath root, String icon, boolean serveDirIndex) throws IOException, ServletException, InterruptedException { serveFile(req, rsp, root.toVirtualFile(), icon, serveDirIndex); } diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index 6b8d5bf89a..b6c1f727c6 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -800,6 +800,7 @@ public class Executor extends Thread implements ModelObject { * Use {@link #doStop()}. */ @RequirePOST + @Deprecated public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { doStop().generateResponse(req,rsp,this); } @@ -937,6 +938,7 @@ public class Executor extends Thread implements ModelObject { * @deprecated as of 1.388 * Use {@link Executables#getEstimatedDurationFor(Queue.Executable)} */ + @Deprecated public static long getEstimatedDurationFor(Executable e) { return Executables.getEstimatedDurationFor(e); } diff --git a/core/src/main/java/hudson/model/FreeStyleProject.java b/core/src/main/java/hudson/model/FreeStyleProject.java index 11ce99a30b..8ba9672ee8 100644 --- a/core/src/main/java/hudson/model/FreeStyleProject.java +++ b/core/src/main/java/hudson/model/FreeStyleProject.java @@ -38,6 +38,7 @@ public class FreeStyleProject extends Project i /** * @deprecated as of 1.390 */ + @Deprecated public FreeStyleProject(Jenkins parent, String name) { super(parent, name); } diff --git a/core/src/main/java/hudson/model/Hudson.java b/core/src/main/java/hudson/model/Hudson.java index 64f00ead83..17b5721a45 100644 --- a/core/src/main/java/hudson/model/Hudson.java +++ b/core/src/main/java/hudson/model/Hudson.java @@ -60,12 +60,14 @@ public class Hudson extends Jenkins { * List of registered {@link hudson.model.listeners.ItemListener}s. * @deprecated as of 1.286 */ + @Deprecated private transient final CopyOnWriteList itemListeners = ExtensionListView.createCopyOnWriteList(ItemListener.class); /** * List of registered {@link hudson.slaves.ComputerListener}s. * @deprecated as of 1.286 */ + @Deprecated private transient final CopyOnWriteList computerListeners = ExtensionListView.createCopyOnWriteList(ComputerListener.class); /** @deprecated Here only for compatibility. Use {@link Jenkins#getInstance} instead. */ @@ -89,6 +91,7 @@ public class Hudson extends Jenkins { * @deprecated as of 1.286. * Use {@link ItemListener#all()}. */ + @Deprecated public CopyOnWriteList getJobListeners() { return itemListeners; } @@ -99,6 +102,7 @@ public class Hudson extends Jenkins { * @deprecated as of 1.286. * Use {@link ComputerListener#all()}. */ + @Deprecated public CopyOnWriteList getComputerListeners() { return computerListeners; } @@ -109,6 +113,7 @@ public class Hudson extends Jenkins { * @deprecated * Use {@link #getNode(String)}. Since 1.252. */ + @Deprecated public Slave getSlave(String name) { Node n = getNode(name); if (n instanceof Slave) @@ -120,6 +125,7 @@ public class Hudson extends Jenkins { * @deprecated * Use {@link #getNodes()}. Since 1.252. */ + @Deprecated public List getSlaves() { return (List)getNodes(); } @@ -130,6 +136,7 @@ public class Hudson extends Jenkins { * @deprecated * Use {@link #setNodes(List)}. Since 1.252. */ + @Deprecated public void setSlaves(List slaves) throws IOException { setNodes(slaves); } @@ -139,6 +146,7 @@ public class Hudson extends Jenkins { * Left only for the compatibility of URLs. * Should not be invoked for any other purpose. */ + @Deprecated public TopLevelItem getJob(String name) { return getItem(name); } @@ -147,6 +155,7 @@ public class Hudson extends Jenkins { * @deprecated * Used only for mapping jobs to URL in a case-insensitive fashion. */ + @Deprecated public TopLevelItem getJobCaseInsensitive(String name) { String match = Functions.toEmailSafeString(name); for(TopLevelItem item : getItems()) { @@ -161,6 +170,7 @@ public class Hudson extends Jenkins { * @deprecated as of 1.317 * Use {@link #doQuietDown()} instead. */ + @Deprecated public synchronized void doQuietDown(StaplerResponse rsp) throws IOException, ServletException { doQuietDown().generateResponse(null, rsp, this); } @@ -171,6 +181,7 @@ public class Hudson extends Jenkins { * @deprecated * As on 1.267, moved to "/log/rss..." */ + @Deprecated public void doLogRss( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { String qs = req.getQueryString(); rsp.sendRedirect2("./log/rss"+(qs==null?"":'?'+qs)); @@ -180,6 +191,7 @@ public class Hudson extends Jenkins { * @deprecated as of 1.294 * Define your own check method, instead of relying on this generic one. */ + @Deprecated public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { doFieldCheck( fixEmpty(req.getParameter("value")), @@ -201,6 +213,7 @@ public class Hudson extends Jenkins { * Either use client-side validation (e.g. class="required number") * or define your own check method, instead of relying on this generic one. */ + @Deprecated public FormValidation doFieldCheck(@QueryParameter(fixEmpty=true) String value, @QueryParameter(fixEmpty=true) String type, @QueryParameter(fixEmpty=true) String errorText, @@ -236,6 +249,7 @@ public class Hudson extends Jenkins { * @deprecated * Use {@link Functions#isWindows()}. */ + @Deprecated public static boolean isWindows() { return File.pathSeparatorChar==';'; } @@ -244,6 +258,7 @@ public class Hudson extends Jenkins { * @deprecated * Use {@link hudson.Platform#isDarwin()} */ + @Deprecated public static boolean isDarwin() { return Platform.isDarwin(); } @@ -252,6 +267,7 @@ public class Hudson extends Jenkins { * @deprecated since 2007-12-18. * Use {@link #checkPermission(hudson.security.Permission)} */ + @Deprecated public static boolean adminCheck() throws IOException { return adminCheck(Stapler.getCurrentRequest(), Stapler.getCurrentResponse()); } @@ -260,6 +276,7 @@ public class Hudson extends Jenkins { * @deprecated since 2007-12-18. * Use {@link #checkPermission(hudson.security.Permission)} */ + @Deprecated public static boolean adminCheck(StaplerRequest req,StaplerResponse rsp) throws IOException { if (isAdmin(req)) return true; @@ -285,6 +302,7 @@ public class Hudson extends Jenkins { * if appropriate), then identify a suitable {@link hudson.security.AccessControlled} object to check its permission * against. */ + @Deprecated public static boolean isAdmin() { return Jenkins.getInstance().getACL().hasPermission(ADMINISTER); } @@ -294,6 +312,7 @@ public class Hudson extends Jenkins { * Define a custom {@link hudson.security.Permission} and check against ACL. * See {@link #isAdmin()} for more instructions. */ + @Deprecated public static boolean isAdmin(StaplerRequest req) { return isAdmin(); } @@ -305,6 +324,7 @@ public class Hudson extends Jenkins { /** * @deprecated only here for backward comp */ + @Deprecated public static final class MasterComputer extends Jenkins.MasterComputer { // no op } @@ -312,6 +332,7 @@ public class Hudson extends Jenkins { /** * @deprecated only here for backward comp */ + @Deprecated public static class CloudList extends Jenkins.CloudList { public CloudList(Jenkins h) { super(h); diff --git a/core/src/main/java/hudson/model/Item.java b/core/src/main/java/hudson/model/Item.java index 726796fa8e..94ee4181de 100644 --- a/core/src/main/java/hudson/model/Item.java +++ b/core/src/main/java/hudson/model/Item.java @@ -176,6 +176,7 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont * This method is only intended for the remote API clients who cannot resolve relative references * (even this won't work for the same reason, which should be fixed.) */ + @Deprecated String getAbsoluteUrl(); /** diff --git a/core/src/main/java/hudson/model/Items.java b/core/src/main/java/hudson/model/Items.java index 03432c4d27..26efd209b5 100644 --- a/core/src/main/java/hudson/model/Items.java +++ b/core/src/main/java/hudson/model/Items.java @@ -66,6 +66,7 @@ public class Items { * @deprecated as of 1.286 * Use {@link #all()} for read access and {@link Extension} for registration. */ + @Deprecated public static final List LIST = (List)new DescriptorList(TopLevelItem.class); /** @@ -172,6 +173,7 @@ public class Items { * @deprecated as of 1.406 * Use {@link #fromNameList(ItemGroup, String, Class)} */ + @Deprecated public static List fromNameList(String list, Class type) { return fromNameList(null,list,type); } diff --git a/core/src/main/java/hudson/model/JDK.java b/core/src/main/java/hudson/model/JDK.java index fe2152b8a6..2ba4490288 100644 --- a/core/src/main/java/hudson/model/JDK.java +++ b/core/src/main/java/hudson/model/JDK.java @@ -80,6 +80,7 @@ public final class JDK extends ToolInstallation implements NodeSpecific, En * @deprecated as of 1.304 * Use {@link #getHome()} */ + @Deprecated public String getJavaHome() { return getHome(); } @@ -108,6 +109,7 @@ public final class JDK extends ToolInstallation implements NodeSpecific, En /** * @deprecated as of 1.460. Use {@link #buildEnvVars(EnvVars)} */ + @Deprecated public void buildEnvVars(Map env) { String home = getHome(); if (home == null) { diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index 2addad98b0..286c7aba32 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -442,6 +442,7 @@ public abstract class Job, RunT extends Run, RunT extends Run, RunT extends Run getBuildsByTimestamp(long start, long end) { return getBuilds().byTimestamp(start,end); } diff --git a/core/src/main/java/hudson/model/JobProperty.java b/core/src/main/java/hudson/model/JobProperty.java index affc3bfd71..600c5e1fb1 100644 --- a/core/src/main/java/hudson/model/JobProperty.java +++ b/core/src/main/java/hudson/model/JobProperty.java @@ -104,6 +104,7 @@ public abstract class JobProperty> implements ReconfigurableD * @deprecated * as of 1.341. Override {@link #getJobActions(Job)} instead. */ + @Deprecated public Action getJobAction(J job) { return null; } diff --git a/core/src/main/java/hudson/model/Jobs.java b/core/src/main/java/hudson/model/Jobs.java index c124861603..e6a13e68d7 100644 --- a/core/src/main/java/hudson/model/Jobs.java +++ b/core/src/main/java/hudson/model/Jobs.java @@ -34,6 +34,7 @@ import java.util.List; * @author Kohsuke Kawaguchi * @deprecated since 1.281 */ +@Deprecated public class Jobs { /** * List of all installed {@link JobPropertyDescriptor} types. @@ -47,6 +48,7 @@ public class Jobs { * Use {@link JobPropertyDescriptor#all()} for read access, * and {@link Extension} for registration. */ + @Deprecated public static final List PROPERTIES = (List) new DescriptorList>((Class)JobProperty.class); } diff --git a/core/src/main/java/hudson/model/LargeText.java b/core/src/main/java/hudson/model/LargeText.java index c7606d90ab..4ad5bdf844 100644 --- a/core/src/main/java/hudson/model/LargeText.java +++ b/core/src/main/java/hudson/model/LargeText.java @@ -50,6 +50,7 @@ import java.io.InputStreamReader; * @author Kohsuke Kawaguchi * @deprecated moved to stapler, as of Hudson 1.220 */ +@Deprecated public class LargeText { /** * Represents the data source of this text. diff --git a/core/src/main/java/hudson/model/LoadBalancer.java b/core/src/main/java/hudson/model/LoadBalancer.java index 19f1eee010..915abf26cb 100644 --- a/core/src/main/java/hudson/model/LoadBalancer.java +++ b/core/src/main/java/hudson/model/LoadBalancer.java @@ -128,6 +128,7 @@ public abstract class LoadBalancer implements ExtensionPoint { * @deprecated as of 1.377 * The only implementation in the core now is the one based on consistent hash. */ + @Deprecated public static final LoadBalancer DEFAULT = CONSISTENT_HASH; diff --git a/core/src/main/java/hudson/model/ManagementLink.java b/core/src/main/java/hudson/model/ManagementLink.java index 4b9fe9524f..ba304a402d 100644 --- a/core/src/main/java/hudson/model/ManagementLink.java +++ b/core/src/main/java/hudson/model/ManagementLink.java @@ -97,6 +97,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action { * @deprecated as of 1.286 * Use {@link #all()} for read access and put {@link Extension} for registration. */ + @Deprecated public static final List LIST = ExtensionListView.createList(ManagementLink.class); /** diff --git a/core/src/main/java/hudson/model/MultiStageTimeSeries.java b/core/src/main/java/hudson/model/MultiStageTimeSeries.java index 33dbee6b82..4f1071b7d4 100644 --- a/core/src/main/java/hudson/model/MultiStageTimeSeries.java +++ b/core/src/main/java/hudson/model/MultiStageTimeSeries.java @@ -110,6 +110,7 @@ public class MultiStageTimeSeries implements Serializable { * @deprecated since 2009-04-05. * Use {@link #MultiStageTimeSeries(Localizable, Color, float, float)} */ + @Deprecated public MultiStageTimeSeries(float initialValue, float decay) { this(Messages._MultiStageTimeSeries_EMPTY_STRING(), Color.WHITE, initialValue,decay); } diff --git a/core/src/main/java/hudson/model/Node.java b/core/src/main/java/hudson/model/Node.java index 61d471e7d7..6a5ceb990c 100644 --- a/core/src/main/java/hudson/model/Node.java +++ b/core/src/main/java/hudson/model/Node.java @@ -133,6 +133,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable * * @deprecated to indicate that this method isn't really meant to be called by random code. */ + @Deprecated public abstract void setNodeName(String name); /** @@ -330,6 +331,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable * @deprecated as of 1.413 * Use {@link #canTake(Queue.BuildableItem)} */ + @Deprecated public CauseOfBlockage canTake(Task task) { return null; } diff --git a/core/src/main/java/hudson/model/OverallLoadStatistics.java b/core/src/main/java/hudson/model/OverallLoadStatistics.java index 98d9852ac9..0f10e12ae8 100644 --- a/core/src/main/java/hudson/model/OverallLoadStatistics.java +++ b/core/src/main/java/hudson/model/OverallLoadStatistics.java @@ -48,6 +48,7 @@ public class OverallLoadStatistics extends LoadStatistics { */ @Exported @Restricted(NoExternalUse.class) + @Deprecated public final MultiStageTimeSeries totalQueueLength = queueLength; public OverallLoadStatistics() { diff --git a/core/src/main/java/hudson/model/PageDecorator.java b/core/src/main/java/hudson/model/PageDecorator.java index d2d71d324a..849ef199fc 100644 --- a/core/src/main/java/hudson/model/PageDecorator.java +++ b/core/src/main/java/hudson/model/PageDecorator.java @@ -79,6 +79,7 @@ public abstract class PageDecorator extends Descriptor implements * @deprecated as of 1.425 * Use the default constructor that's less error prone */ + @Deprecated protected PageDecorator(Class yourClass) { super(yourClass); } @@ -119,6 +120,7 @@ public abstract class PageDecorator extends Descriptor implements * @deprecated as of 1.286 * Use {@link #all()} for read access, and use {@link Extension} for registration. */ + @Deprecated public static final List ALL = (List)new DescriptorList(PageDecorator.class); /** diff --git a/core/src/main/java/hudson/model/ParameterDefinition.java b/core/src/main/java/hudson/model/ParameterDefinition.java index a62c4902c0..63438fbf81 100644 --- a/core/src/main/java/hudson/model/ParameterDefinition.java +++ b/core/src/main/java/hudson/model/ParameterDefinition.java @@ -232,6 +232,7 @@ public abstract class ParameterDefinition implements * @deprecated as of 1.286 * Use {@link #all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final DescriptorList LIST = new DescriptorList(ParameterDefinition.class); public abstract static class ParameterDescriptor extends diff --git a/core/src/main/java/hudson/model/ParameterValue.java b/core/src/main/java/hudson/model/ParameterValue.java index 8bafa5aa76..d3b39f614a 100644 --- a/core/src/main/java/hudson/model/ParameterValue.java +++ b/core/src/main/java/hudson/model/ParameterValue.java @@ -127,6 +127,7 @@ public abstract class ParameterValue implements Serializable { * @deprecated as of 1.344 * Use {@link #buildEnvironment(Run, EnvVars)} instead. */ + @Deprecated public void buildEnvVars(AbstractBuild build, Map env) { if (env instanceof EnvVars) { if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvironment", Run.class, EnvVars.class)) { @@ -222,6 +223,7 @@ public abstract class ParameterValue implements Serializable { * instead copy them in {@link ParameterDefinition#createValue(StaplerRequest, JSONObject)} * into {@link ParameterValue}. */ + @Deprecated public ParameterDefinition getDefinition() { throw new UnsupportedOperationException(); } diff --git a/core/src/main/java/hudson/model/ParametersAction.java b/core/src/main/java/hudson/model/ParametersAction.java index 85ed085c80..202703036d 100644 --- a/core/src/main/java/hudson/model/ParametersAction.java +++ b/core/src/main/java/hudson/model/ParametersAction.java @@ -64,6 +64,7 @@ public class ParametersAction implements Action, Iterable, Queue /** * @deprecated since 1.283; kept to avoid warnings loading old build data, but now transient. */ + @Deprecated private transient AbstractBuild build; public ParametersAction(List parameters) { diff --git a/core/src/main/java/hudson/model/PeriodicWork.java b/core/src/main/java/hudson/model/PeriodicWork.java index d66ef11d48..c3a1bf4953 100644 --- a/core/src/main/java/hudson/model/PeriodicWork.java +++ b/core/src/main/java/hudson/model/PeriodicWork.java @@ -60,6 +60,7 @@ public abstract class PeriodicWork extends SafeTimerTask implements ExtensionPoi /** @deprecated Use your own logger, or send messages to the logger in {@link AsyncPeriodicWork#execute}. */ @SuppressWarnings("NonConstantLogger") + @Deprecated protected final Logger logger = Logger.getLogger(getClass().getName()); /** diff --git a/core/src/main/java/hudson/model/Project.java b/core/src/main/java/hudson/model/Project.java index 894bb612d7..1b5fe37254 100644 --- a/core/src/main/java/hudson/model/Project.java +++ b/core/src/main/java/hudson/model/Project.java @@ -130,6 +130,7 @@ public abstract class Project

,B extends Build> * We will be soon removing the restriction that only one instance of publisher is allowed per type. * Use {@link #getPublishersList()} instead. */ + @Deprecated public Map,Publisher> getPublishers() { return getPublishersList().toMap(); } @@ -177,6 +178,7 @@ public abstract class Project

,B extends Build> * @deprecated as of 1.290 * Use {@code getPublishersList().add(x)} */ + @Deprecated public void addPublisher(Publisher buildStep) throws IOException { getPublishersList().add(buildStep); } @@ -187,6 +189,7 @@ public abstract class Project

,B extends Build> * @deprecated as of 1.290 * Use {@code getPublishersList().remove(x)} */ + @Deprecated public void removePublisher(Descriptor descriptor) throws IOException { getPublishersList().remove(descriptor); } diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 9284e95ece..2af4170881 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -519,6 +519,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.311 * Use {@link #schedule(AbstractProject)} */ + @Deprecated public boolean add(AbstractProject p) { return schedule(p)!=null; } @@ -541,6 +542,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.311 * Use {@link #schedule(Task, int)} */ + @Deprecated public boolean add(AbstractProject p, int quietPeriod) { return schedule(p, quietPeriod)!=null; } @@ -549,6 +551,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.521 * Use {@link #schedule2(Task, int, List)} */ + @Deprecated public WaitingItem schedule(Task p, int quietPeriod, List actions) { return schedule2(p, quietPeriod, actions).getCreateItem(); } @@ -684,6 +687,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.311 * Use {@link #schedule(Task, int)} */ + @Deprecated public boolean add(Task p, int quietPeriod) { return schedule(p, quietPeriod)!=null; } @@ -696,6 +700,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.311 * Use {@link #schedule(Task, int, Action...)} */ + @Deprecated public boolean add(Task p, int quietPeriod, Action... actions) { return schedule(p, quietPeriod, actions)!=null; } @@ -1453,6 +1458,7 @@ public class Queue extends ResourceController implements Saveable { } /** @deprecated Use {@link #isBlockedByShutdown} instead. */ + @Deprecated public static boolean ifBlockedByHudsonShutdown(Task task) { return isBlockedByShutdown(task); } @@ -1530,6 +1536,7 @@ public class Queue extends ResourceController implements Saveable { * @deprecated as of 1.330 * Use {@link CauseOfBlockage#getShortDescription()} instead. */ + @Deprecated String getWhyBlocked(); /** diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 8e229fb42a..141b87000a 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -984,6 +984,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run,RunT extends Run,RunT extends Run,RunT extends Run getEnvVars() { LOGGER.log(WARNING, "deprecated call to Run.getEnvVars\n\tat {0}", new Throwable().getStackTrace()[1]); try { @@ -2206,6 +2211,7 @@ public abstract class Run ,RunT extends Run> extends AbstractLazyLoadRunMap * @deprecated as of 1.485 * Use {@link #RunMap(File, Constructor)}. */ + @Deprecated public RunMap() { super(null); // will be set later } @@ -152,6 +153,7 @@ public final class RunMap> extends AbstractLazyLoadRunMap * @deprecated as of 1.485 * Use {@link ReverseComparator} */ + @Deprecated public static final Comparator COMPARATOR = new Comparator() { public int compare(Comparable o1, Comparable o2) { return -o1.compareTo(o2); @@ -247,6 +249,7 @@ public final class RunMap> extends AbstractLazyLoadRunMap * @deprecated as of 1.485 * Use {@link #RunMap(File, Constructor)} */ + @Deprecated public void load(Job job, Constructor cons) { this.cons = cons; initBaseDir(job.getBuildDir()); diff --git a/core/src/main/java/hudson/model/RunParameterDefinition.java b/core/src/main/java/hudson/model/RunParameterDefinition.java index a1ad6879e2..07195499d6 100644 --- a/core/src/main/java/hudson/model/RunParameterDefinition.java +++ b/core/src/main/java/hudson/model/RunParameterDefinition.java @@ -74,6 +74,7 @@ public class RunParameterDefinition extends SimpleParameterDefinition { /** * @deprecated as of 1.517 */ + @Deprecated public RunParameterDefinition(String name, String projectName, String description) { // delegate to updated constructor with additional RunParameterFilter parameter defaulted to ALL. this(name, projectName, description, RunParameterFilter.ALL); diff --git a/core/src/main/java/hudson/model/SCMedItem.java b/core/src/main/java/hudson/model/SCMedItem.java index ef4ae60d94..142e4f5153 100644 --- a/core/src/main/java/hudson/model/SCMedItem.java +++ b/core/src/main/java/hudson/model/SCMedItem.java @@ -30,6 +30,7 @@ import jenkins.triggers.SCMTriggerItem; /** * @deprecated Implement {@link SCMTriggerItem} instead. */ +@Deprecated public interface SCMedItem extends BuildableItem { /** * Gets the {@link SCM} for this item. @@ -55,6 +56,7 @@ public interface SCMedItem extends BuildableItem { * @deprecated as of 1.346 * Use {@link #poll(TaskListener)} instead. */ + @Deprecated boolean pollSCMChanges( TaskListener listener ); /** diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index 6a0a955af5..30bc6bf217 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -451,6 +451,7 @@ public abstract class Slave extends Node implements Serializable { * "ssh myslave java -jar /path/to/hudson-remoting.jar" * @deprecated in 1.216 */ + @Deprecated private transient String agentCommand; /** diff --git a/core/src/main/java/hudson/model/StreamBuildListener.java b/core/src/main/java/hudson/model/StreamBuildListener.java index f00877ec11..aa6bff2521 100644 --- a/core/src/main/java/hudson/model/StreamBuildListener.java +++ b/core/src/main/java/hudson/model/StreamBuildListener.java @@ -57,6 +57,7 @@ public class StreamBuildListener extends StreamTaskListener implements BuildList * The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in * the charset and output stream separately, so that this class can handle encoding correctly. */ + @Deprecated public StreamBuildListener(PrintStream w) { super(w); } diff --git a/core/src/main/java/hudson/model/TaskAction.java b/core/src/main/java/hudson/model/TaskAction.java index f42c7fdae6..3a7a657d7a 100644 --- a/core/src/main/java/hudson/model/TaskAction.java +++ b/core/src/main/java/hudson/model/TaskAction.java @@ -80,6 +80,7 @@ public abstract class TaskAction extends AbstractModelObject implements Action { * @deprecated as of 1.350 * Use {@link #obtainLog()}, which returns the same object in a more type-safe signature. */ + @Deprecated public LargeText getLog() { return obtainLog(); } diff --git a/core/src/main/java/hudson/model/TaskThread.java b/core/src/main/java/hudson/model/TaskThread.java index d1c750f64f..8cb60c320a 100644 --- a/core/src/main/java/hudson/model/TaskThread.java +++ b/core/src/main/java/hudson/model/TaskThread.java @@ -51,6 +51,7 @@ public abstract class TaskThread extends Thread { * @deprecated as of Hudson 1.350 * Use {@link #log}. It's the same object, in a better type. */ + @Deprecated private final LargeText text; /** @@ -163,6 +164,7 @@ public abstract class TaskThread extends Thread { * @deprecated as of Hudson 1.350 * Use {@link #forMemory(TaskAction)} and pass in the calling {@link TaskAction} */ + @Deprecated public static ListenerAndText forMemory() { return forMemory(null); } @@ -171,6 +173,7 @@ public abstract class TaskThread extends Thread { * @deprecated as of Hudson 1.350 * Use {@link #forFile(File, TaskAction)} and pass in the calling {@link TaskAction} */ + @Deprecated public static ListenerAndText forFile(File f) throws IOException { return forFile(f,null); } diff --git a/core/src/main/java/hudson/model/TopLevelItemDescriptor.java b/core/src/main/java/hudson/model/TopLevelItemDescriptor.java index 1ed5dda3ee..7aa4145a1a 100644 --- a/core/src/main/java/hudson/model/TopLevelItemDescriptor.java +++ b/core/src/main/java/hudson/model/TopLevelItemDescriptor.java @@ -125,6 +125,7 @@ public abstract class TopLevelItemDescriptor extends Descriptor { * @deprecated as of 1.390 * Use {@link #newInstance(ItemGroup, String)} */ + @Deprecated public TopLevelItem newInstance(String name) { return newInstance(Jenkins.getInstance(), name); } diff --git a/core/src/main/java/hudson/model/TransientBuildActionFactory.java b/core/src/main/java/hudson/model/TransientBuildActionFactory.java index 314590f0ec..0ac332823f 100644 --- a/core/src/main/java/hudson/model/TransientBuildActionFactory.java +++ b/core/src/main/java/hudson/model/TransientBuildActionFactory.java @@ -37,6 +37,7 @@ public abstract class TransientBuildActionFactory implements ExtensionPoint { * @deprecated as of 1.461 * Override and call {@link #createFor(Run)} instead. */ + @Deprecated public Collection createFor(AbstractBuild target) { return Collections.emptyList(); } @@ -47,4 +48,4 @@ public abstract class TransientBuildActionFactory implements ExtensionPoint { public static ExtensionList all() { return ExtensionList.lookup(TransientBuildActionFactory.class); } -} \ No newline at end of file +} diff --git a/core/src/main/java/hudson/model/UpdateCenter.java b/core/src/main/java/hudson/model/UpdateCenter.java index 89868a4108..875c76ffc3 100644 --- a/core/src/main/java/hudson/model/UpdateCenter.java +++ b/core/src/main/java/hudson/model/UpdateCenter.java @@ -320,6 +320,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * TODO: revisit tool update mechanism, as that should be de-centralized, too. In the mean time, * please try not to use this method, and instead ping us to get this part completed. */ + @Deprecated public String getDefaultBaseUrl() { return config.getUpdateCenterUrl(); } @@ -842,6 +843,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * is now a part of the update-center.json file. See * http://jenkins-ci.org/update-center.json as an example. */ + @Deprecated public String getConnectionCheckUrl() { return "http://www.google.com"; } @@ -856,6 +858,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * @return * Absolute URL that ends with '/'. */ + @Deprecated public String getUpdateCenterUrl() { return UPDATE_CENTER_URL; } @@ -867,6 +870,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * update-center.json is now signed, so we don't have to further make sure that * we aren't downloading from anywhere unsecure. */ + @Deprecated public String getPluginRepositoryBaseUrl() { return "http://jenkins-ci.org/"; } @@ -920,6 +924,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * @deprecated as of 1.326 * Use {@link #submit()} instead. */ + @Deprecated public void schedule() { submit(); } @@ -1270,6 +1275,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas /** * @deprecated as of 1.442 */ + @Deprecated public InstallationJob(Plugin plugin, UpdateSite site, Authentication auth) { this(plugin,site,auth,false); } @@ -1565,6 +1571,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas * @deprecated as of 1.333 * Use {@link UpdateSite#neverUpdate} */ + @Deprecated public static boolean neverUpdate = Boolean.getBoolean(UpdateCenter.class.getName()+".never"); public static final XStream2 XSTREAM = new XStream2(); diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 0616a3a01f..9fc1caaf46 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -406,6 +406,7 @@ public class UpdateSite { * @deprecated * Exposed only for UI. */ + @Deprecated public String getDownloadUrl() { /* HACKISH: @@ -768,6 +769,7 @@ public class UpdateSite { * @deprecated as of 1.326 * Use {@link #deploy()}. */ + @Deprecated public void install() { deploy(); } diff --git a/core/src/main/java/hudson/model/User.java b/core/src/main/java/hudson/model/User.java index 85e4df752b..e2a09768f4 100644 --- a/core/src/main/java/hudson/model/User.java +++ b/core/src/main/java/hudson/model/User.java @@ -357,6 +357,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr * {@code create} is false. * @deprecated use {@link User#get(String, boolean, java.util.Map)} */ + @Deprecated public static @Nullable User get(String idOrFullName, boolean create) { return get(idOrFullName, create, Collections.emptyMap()); } diff --git a/core/src/main/java/hudson/model/UserProperties.java b/core/src/main/java/hudson/model/UserProperties.java index 5561fe7caa..2c936dfbbf 100644 --- a/core/src/main/java/hudson/model/UserProperties.java +++ b/core/src/main/java/hudson/model/UserProperties.java @@ -33,10 +33,12 @@ import java.util.List; * @author Kohsuke Kawaguchi * @deprecated as of 1.286 */ +@Deprecated public class UserProperties { /** * @deprecated as of 1.286 * Use {@link UserProperty#all()} for read access and {@link Extension} for auto-registration. */ + @Deprecated public static final List LIST = (List)new DescriptorList(UserProperty.class); } diff --git a/core/src/main/java/hudson/model/View.java b/core/src/main/java/hudson/model/View.java index d30a80e876..d55aebd3f4 100644 --- a/core/src/main/java/hudson/model/View.java +++ b/core/src/main/java/hudson/model/View.java @@ -655,6 +655,7 @@ public abstract class View extends AbstractModelObject implements AccessControll * Does this {@link View} has any associated user information recorded? * @deprecated Potentially very expensive call; do not use from Jelly views. */ + @Deprecated public boolean hasPeople() { return People.isApplicable(getItems()); } @@ -738,6 +739,7 @@ public abstract class View extends AbstractModelObject implements AccessControll /** * @deprecated Potentially very expensive call; do not use from Jelly views. */ + @Deprecated public static boolean isApplicable(Collection items) { for (Item item : items) { for (Job job : item.getAllJobs()) { @@ -1116,6 +1118,7 @@ public abstract class View extends AbstractModelObject implements AccessControll * @deprecated as of 1.286 * Use {@link #all()} for read access, and use {@link Extension} for registration. */ + @Deprecated public static final DescriptorList LIST = new DescriptorList(View.class); /** diff --git a/core/src/main/java/hudson/model/ViewJob.java b/core/src/main/java/hudson/model/ViewJob.java index c86abb33e7..92e36999e2 100644 --- a/core/src/main/java/hudson/model/ViewJob.java +++ b/core/src/main/java/hudson/model/ViewJob.java @@ -79,6 +79,7 @@ public abstract class ViewJob, RunT extends Run< /** * @deprecated as of 1.390 */ + @Deprecated protected ViewJob(Jenkins parent, String name) { super(parent,name); } diff --git a/core/src/main/java/hudson/model/listeners/ItemListener.java b/core/src/main/java/hudson/model/listeners/ItemListener.java index 4f3d235f51..7ff530c438 100644 --- a/core/src/main/java/hudson/model/listeners/ItemListener.java +++ b/core/src/main/java/hudson/model/listeners/ItemListener.java @@ -148,6 +148,7 @@ public class ItemListener implements ExtensionPoint { * @deprecated as of 1.286 * put {@link Extension} on your class to have it auto-registered. */ + @Deprecated public void register() { all().add(this); } diff --git a/core/src/main/java/hudson/model/listeners/RunListener.java b/core/src/main/java/hudson/model/listeners/RunListener.java index 329292ded0..e65347bc02 100644 --- a/core/src/main/java/hudson/model/listeners/RunListener.java +++ b/core/src/main/java/hudson/model/listeners/RunListener.java @@ -171,6 +171,7 @@ public abstract class RunListener implements ExtensionPoint { * @deprecated as of 1.281 * Put {@link Extension} on your class to get it auto-registered. */ + @Deprecated public void register() { all().add(this); } @@ -187,6 +188,7 @@ public abstract class RunListener implements ExtensionPoint { * @deprecated as of 1.281 * Use {@link #all()} for read access, and use {@link Extension} for registration. */ + @Deprecated public static final CopyOnWriteList LISTENERS = ExtensionListView.createCopyOnWriteList(RunListener.class); /** diff --git a/core/src/main/java/hudson/model/listeners/SaveableListener.java b/core/src/main/java/hudson/model/listeners/SaveableListener.java index f0ad8d5720..37fed04f69 100644 --- a/core/src/main/java/hudson/model/listeners/SaveableListener.java +++ b/core/src/main/java/hudson/model/listeners/SaveableListener.java @@ -60,6 +60,7 @@ public abstract class SaveableListener implements ExtensionPoint { * @deprecated as of 1.281 * Put {@link Extension} on your class to get it auto-registered. */ + @Deprecated public void register() { all().add(this); } diff --git a/core/src/main/java/hudson/model/queue/LoadPredictor.java b/core/src/main/java/hudson/model/queue/LoadPredictor.java index 868bf92760..cb2070b596 100644 --- a/core/src/main/java/hudson/model/queue/LoadPredictor.java +++ b/core/src/main/java/hudson/model/queue/LoadPredictor.java @@ -73,6 +73,7 @@ public abstract class LoadPredictor implements ExtensionPoint { * @deprecated as of 1.380 * Use {@link #predict(MappingWorksheet, Computer, long, long)} */ + @Deprecated public Iterable predict(Computer computer, long start, long end) { return Collections.emptyList(); } diff --git a/core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java b/core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java index fe8681975c..78ac2c527e 100644 --- a/core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java +++ b/core/src/main/java/hudson/model/queue/QueueTaskDispatcher.java @@ -68,6 +68,7 @@ public abstract class QueueTaskDispatcher implements ExtensionPoint { * @deprecated since 1.413 * Use {@link #canTake(Node, Queue.BuildableItem)} */ + @Deprecated public @CheckForNull CauseOfBlockage canTake(Node node, Task task) { return null; } diff --git a/core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java b/core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java index 21c0f95dd3..ff457ffed0 100644 --- a/core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java +++ b/core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java @@ -58,6 +58,7 @@ public abstract class AbstractNodeMonitorDescriptor extends Descriptor extends Descriptor extends Descriptor clazz) { this(clazz,HOUR); } @@ -82,6 +85,7 @@ public abstract class AbstractNodeMonitorDescriptor extends Descriptor clazz, long interval) { super(clazz); @@ -243,6 +247,7 @@ public abstract class AbstractNodeMonitorDescriptor extends Descriptor LIST = new DescriptorList(NodeMonitor.class); /** diff --git a/core/src/main/java/hudson/os/solaris/ZFSProvisioner.java b/core/src/main/java/hudson/os/solaris/ZFSProvisioner.java index 649a4880f2..a2ba279f3b 100644 --- a/core/src/main/java/hudson/os/solaris/ZFSProvisioner.java +++ b/core/src/main/java/hudson/os/solaris/ZFSProvisioner.java @@ -102,6 +102,7 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl /** * @deprecated as of 1.350 */ + @Deprecated public WorkspaceSnapshot snapshot(AbstractBuild build, FilePath ws, TaskListener listener) throws IOException, InterruptedException { throw new UnsupportedOperationException(); } diff --git a/core/src/main/java/hudson/scheduler/CronTab.java b/core/src/main/java/hudson/scheduler/CronTab.java index 9a86ec1400..8d0ad9f7f2 100644 --- a/core/src/main/java/hudson/scheduler/CronTab.java +++ b/core/src/main/java/hudson/scheduler/CronTab.java @@ -70,6 +70,7 @@ public final class CronTab { * @deprecated as of 1.448 * Use {@link #CronTab(String, int, Hash)} */ + @Deprecated public CronTab(String format, int line) throws ANTLRException { set(format, line, null); } diff --git a/core/src/main/java/hudson/scm/ChangeLogAnnotator.java b/core/src/main/java/hudson/scm/ChangeLogAnnotator.java index 67173edb3b..ebe0227ea9 100644 --- a/core/src/main/java/hudson/scm/ChangeLogAnnotator.java +++ b/core/src/main/java/hudson/scm/ChangeLogAnnotator.java @@ -98,6 +98,7 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint { * @deprecated as of 1.286 * Prefer automatic registration via {@link Extension} */ + @Deprecated public final void register() { all().add(this); } @@ -115,6 +116,7 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint { * @deprecated as of 1.286 * Use {@link #all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final CopyOnWriteList annotators = ExtensionListView.createCopyOnWriteList(ChangeLogAnnotator.class); /** diff --git a/core/src/main/java/hudson/scm/RepositoryBrowsers.java b/core/src/main/java/hudson/scm/RepositoryBrowsers.java index 3c5dd86c0e..c7d8ab90da 100644 --- a/core/src/main/java/hudson/scm/RepositoryBrowsers.java +++ b/core/src/main/java/hudson/scm/RepositoryBrowsers.java @@ -46,6 +46,7 @@ public class RepositoryBrowsers { * @deprecated as of 1.286. * Use {@link RepositoryBrowser#all()} for read access and {@link Extension} for registration. */ + @Deprecated public static final List>> LIST = new DescriptorList>((Class)RepositoryBrowser.class); /** @@ -65,6 +66,7 @@ public class RepositoryBrowsers { * @deprecated since 2008-06-19. * Use {@link #createInstance(Class, StaplerRequest, JSONObject, String)}. */ + @Deprecated public static T createInstance(Class type, StaplerRequest req, String fieldName) throws FormException { List>> list = filter(type); diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index 297ec0e2e1..e7597933d0 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -268,6 +268,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * * Call {@link #poll(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)} for use instead. */ + @Deprecated public boolean pollChanges(AbstractProject project, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException, InterruptedException { // up until 1.336, this method was abstract, so everyone should have overridden this method // without calling super.pollChanges. So the compatibility implementation is purely for @@ -578,6 +579,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * @deprecated since 1.382 * Use/override {@link #getModuleRoot(FilePath, AbstractBuild)} instead. */ + @Deprecated public FilePath getModuleRoot(FilePath workspace) { if (Util.isOverridden(SCM.class,getClass(),"getModuleRoot", FilePath.class,AbstractBuild.class)) // if the subtype already implements newer getModuleRoot(FilePath,AbstractBuild), call that. @@ -632,6 +634,7 @@ public abstract class SCM implements Describable, ExtensionPoint { * @deprecated as of 1.382. * Use/derive from {@link #getModuleRoots(FilePath, AbstractBuild)} instead. */ + @Deprecated public FilePath[] getModuleRoots(FilePath workspace) { if (Util.isOverridden(SCM.class,getClass(),"getModuleRoots", FilePath.class, AbstractBuild.class)) // if the subtype already derives newer getModuleRoots(FilePath,AbstractBuild), delegate to it diff --git a/core/src/main/java/hudson/scm/SCMS.java b/core/src/main/java/hudson/scm/SCMS.java index 351d1b6a47..e79af364de 100644 --- a/core/src/main/java/hudson/scm/SCMS.java +++ b/core/src/main/java/hudson/scm/SCMS.java @@ -45,6 +45,7 @@ public class SCMS { * @deprecated as of 1.286 * Use {@link SCM#all()} for read access and {@link Extension} for registration. */ + @Deprecated public static final List> SCMS = (List)new DescriptorList(SCM.class); /** @@ -67,6 +68,7 @@ public class SCMS { * @deprecated as of 1.294 * Use {@link #parseSCM(StaplerRequest, AbstractProject)} and pass in the caller's project type. */ + @Deprecated public static SCM parseSCM(StaplerRequest req) throws FormException, ServletException { return parseSCM(req,null); } diff --git a/core/src/main/java/hudson/security/AuthorizationStrategy.java b/core/src/main/java/hudson/security/AuthorizationStrategy.java index 22d21d72fc..f544e8ad30 100644 --- a/core/src/main/java/hudson/security/AuthorizationStrategy.java +++ b/core/src/main/java/hudson/security/AuthorizationStrategy.java @@ -194,6 +194,7 @@ public abstract class AuthorizationStrategy extends AbstractDescribableImpl LIST = new DescriptorList(AuthorizationStrategy.class); /** diff --git a/core/src/main/java/hudson/security/DeferredCreationLdapAuthoritiesPopulator.java b/core/src/main/java/hudson/security/DeferredCreationLdapAuthoritiesPopulator.java index 34276f279a..f6ae9ca44d 100644 --- a/core/src/main/java/hudson/security/DeferredCreationLdapAuthoritiesPopulator.java +++ b/core/src/main/java/hudson/security/DeferredCreationLdapAuthoritiesPopulator.java @@ -44,6 +44,7 @@ import hudson.security.SecurityRealm.SecurityComponents; * {@link SecurityComponents} are now created after {@link SecurityRealm} is created, so * the initialization order issue that this code was trying to address no longer exists. */ +@Deprecated public class DeferredCreationLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator { /** diff --git a/core/src/main/java/hudson/security/HudsonFilter.java b/core/src/main/java/hudson/security/HudsonFilter.java index e59e9d4e7e..3a1868344a 100644 --- a/core/src/main/java/hudson/security/HudsonFilter.java +++ b/core/src/main/java/hudson/security/HudsonFilter.java @@ -74,6 +74,7 @@ public class HudsonFilter implements Filter { * This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().manager}, * so use that instead. */ + @Deprecated public static final AuthenticationManagerProxy AUTHENTICATION_MANAGER = new AuthenticationManagerProxy(); /** @@ -84,6 +85,7 @@ public class HudsonFilter implements Filter { * This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails}, * so use that instead. */ + @Deprecated public static final UserDetailsServiceProxy USER_DETAILS_SERVICE_PROXY = new UserDetailsServiceProxy(); /** @@ -94,6 +96,7 @@ public class HudsonFilter implements Filter { * This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe}, * so use that instead. */ + @Deprecated public static final RememberMeServicesProxy REMEMBER_ME_SERVICES_PROXY = new RememberMeServicesProxy(); public void init(FilterConfig filterConfig) throws ServletException { diff --git a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java index 546d611fcf..ad09166da5 100644 --- a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java +++ b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java @@ -467,6 +467,7 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea * Field kept here to load old (pre 1.283) user records, * but now marked transient so field is no longer saved. */ + @Deprecated private transient String password; private Details(String passwordHash) { diff --git a/core/src/main/java/hudson/security/InvalidatableUserDetails.java b/core/src/main/java/hudson/security/InvalidatableUserDetails.java index 8c3e2551d4..8f59170c01 100644 --- a/core/src/main/java/hudson/security/InvalidatableUserDetails.java +++ b/core/src/main/java/hudson/security/InvalidatableUserDetails.java @@ -54,6 +54,7 @@ import jenkins.security.NonSerializableSecurityContext; * Starting 1.285, Hudson stops persisting {@link Authentication} altogether * (see {@link NonSerializableSecurityContext}), so there's no need to use this mechanism. */ +@Deprecated public interface InvalidatableUserDetails extends UserDetails { boolean isInvalid(); } diff --git a/core/src/main/java/hudson/security/Permission.java b/core/src/main/java/hudson/security/Permission.java index 7c758072da..2bfdeb0bc9 100644 --- a/core/src/main/java/hudson/security/Permission.java +++ b/core/src/main/java/hudson/security/Permission.java @@ -173,6 +173,7 @@ public final class Permission { * @deprecated as of 1.421 * Use {@link #Permission(PermissionGroup, String, Localizable, Permission, boolean, PermissionScope[])} */ + @Deprecated public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Localizable description, @CheckForNull Permission impliedBy, boolean enable) { this(group,name,description,impliedBy,enable,new PermissionScope[]{PermissionScope.JENKINS}); } @@ -181,6 +182,7 @@ public final class Permission { * @deprecated as of 1.421 * Use {@link #Permission(PermissionGroup, String, Localizable, Permission, PermissionScope)} */ + @Deprecated public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Localizable description, @CheckForNull Permission impliedBy) { this(group, name, description, impliedBy, PermissionScope.JENKINS); } @@ -189,6 +191,7 @@ public final class Permission { * @deprecated since 1.257. * Use {@link #Permission(PermissionGroup, String, Localizable, Permission)} */ + @Deprecated public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Permission impliedBy) { this(group,name,null,impliedBy); } @@ -293,6 +296,7 @@ public final class Permission { * @deprecated since 2009-01-23. * Access {@link jenkins.model.Jenkins#PERMISSIONS} instead. */ + @Deprecated public static final PermissionGroup HUDSON_PERMISSIONS = new PermissionGroup(Hudson.class, hudson.model.Messages._Hudson_Permissions_Title()); /** * {@link Permission} that represents the God-like access. Equivalent of Unix root. @@ -303,6 +307,7 @@ public final class Permission { * @deprecated since 2009-01-23. * Access {@link jenkins.model.Jenkins#ADMINISTER} instead. */ + @Deprecated public static final Permission HUDSON_ADMINISTER = new Permission(HUDSON_PERMISSIONS,"Administer", hudson.model.Messages._Hudson_AdministerPermission_Description(),null); // @@ -322,6 +327,7 @@ public final class Permission { * @deprecated since 2009-01-23. * Use {@link jenkins.model.Jenkins#ADMINISTER}. */ + @Deprecated public static final Permission FULL_CONTROL = new Permission(GROUP, "FullControl",null, HUDSON_ADMINISTER); /** diff --git a/core/src/main/java/hudson/security/SecurityRealm.java b/core/src/main/java/hudson/security/SecurityRealm.java index 4e4e8484a4..3c598632ab 100644 --- a/core/src/main/java/hudson/security/SecurityRealm.java +++ b/core/src/main/java/hudson/security/SecurityRealm.java @@ -593,6 +593,7 @@ public abstract class SecurityRealm extends AbstractDescribableImpl LIST = new DescriptorList(SecurityRealm.class); /** diff --git a/core/src/main/java/hudson/slaves/Channels.java b/core/src/main/java/hudson/slaves/Channels.java index 1f2878a57c..873cdbe4e3 100644 --- a/core/src/main/java/hudson/slaves/Channels.java +++ b/core/src/main/java/hudson/slaves/Channels.java @@ -62,6 +62,7 @@ public class Channels { * @deprecated since 2009-04-13. * Use {@link #forProcess(String, ExecutorService, InputStream, OutputStream, OutputStream, Proc)} */ + @Deprecated public static Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, Proc proc) throws IOException { return forProcess(name,execService,in,out,null,proc); } diff --git a/core/src/main/java/hudson/slaves/Cloud.java b/core/src/main/java/hudson/slaves/Cloud.java index ef7469f33f..c3e3679474 100644 --- a/core/src/main/java/hudson/slaves/Cloud.java +++ b/core/src/main/java/hudson/slaves/Cloud.java @@ -165,6 +165,7 @@ public abstract class Cloud extends AbstractModelObject implements ExtensionPoin * @deprecated as of 1.286 * Use {@link #all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final DescriptorList ALL = new DescriptorList(Cloud.class); /** diff --git a/core/src/main/java/hudson/slaves/ComputerLauncher.java b/core/src/main/java/hudson/slaves/ComputerLauncher.java index 56b78c7696..18c44d7b60 100644 --- a/core/src/main/java/hudson/slaves/ComputerLauncher.java +++ b/core/src/main/java/hudson/slaves/ComputerLauncher.java @@ -93,6 +93,7 @@ public abstract class ComputerLauncher extends AbstractDescribableImpl LIST = new DescriptorList(ComputerLauncher.class); /** diff --git a/core/src/main/java/hudson/slaves/ComputerListener.java b/core/src/main/java/hudson/slaves/ComputerListener.java index 5af844859e..96e1abe937 100644 --- a/core/src/main/java/hudson/slaves/ComputerListener.java +++ b/core/src/main/java/hudson/slaves/ComputerListener.java @@ -132,6 +132,7 @@ public abstract class ComputerListener implements ExtensionPoint { * @deprecated as of 1.292 * Use {@link #onOnline(Computer, TaskListener)} */ + @Deprecated public void onOnline(Computer c) {} /** @@ -214,6 +215,7 @@ public abstract class ComputerListener implements ExtensionPoint { * @deprecated as of 1.286 * put {@link Extension} on your class to have it auto-registered. */ + @Deprecated public final void register() { all().add(this); } diff --git a/core/src/main/java/hudson/slaves/DumbSlave.java b/core/src/main/java/hudson/slaves/DumbSlave.java index 6e9444791b..618cb976db 100644 --- a/core/src/main/java/hudson/slaves/DumbSlave.java +++ b/core/src/main/java/hudson/slaves/DumbSlave.java @@ -44,6 +44,7 @@ public final class DumbSlave extends Slave { * @deprecated as of 1.286. * Use {@link #DumbSlave(String, String, String, String, Node.Mode, String, ComputerLauncher, RetentionStrategy, List)} */ + @Deprecated public DumbSlave(String name, String nodeDescription, String remoteFS, String numExecutors, Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy) throws FormException, IOException { this(name, nodeDescription, remoteFS, numExecutors, mode, labelString, launcher, retentionStrategy, new ArrayList()); } diff --git a/core/src/main/java/hudson/slaves/NodeDescriptor.java b/core/src/main/java/hudson/slaves/NodeDescriptor.java index 38cac33966..d75d3a1529 100644 --- a/core/src/main/java/hudson/slaves/NodeDescriptor.java +++ b/core/src/main/java/hudson/slaves/NodeDescriptor.java @@ -120,6 +120,7 @@ public abstract class NodeDescriptor extends Descriptor { * @deprecated as of 1.286 * Use {@link #all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final DescriptorList ALL = new DescriptorList(Node.class); public static List allInstantiable() { diff --git a/core/src/main/java/hudson/slaves/NodeProperty.java b/core/src/main/java/hudson/slaves/NodeProperty.java index 68c50230c4..7f71adebef 100644 --- a/core/src/main/java/hudson/slaves/NodeProperty.java +++ b/core/src/main/java/hudson/slaves/NodeProperty.java @@ -97,6 +97,7 @@ public abstract class NodeProperty implements ReconfigurableDesc * @deprecated as of 1.413 * Use {@link #canTake(Queue.BuildableItem)} */ + @Deprecated public CauseOfBlockage canTake(Task task) { return null; } diff --git a/core/src/main/java/hudson/slaves/NodeProvisioner.java b/core/src/main/java/hudson/slaves/NodeProvisioner.java index 25d23c47c9..bf326d7956 100644 --- a/core/src/main/java/hudson/slaves/NodeProvisioner.java +++ b/core/src/main/java/hudson/slaves/NodeProvisioner.java @@ -392,6 +392,7 @@ public class NodeProvisioner { * The number of items in the queue requiring this {@link #getLabel()}. * @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getQueueLength()} */ + @Deprecated public int getQueueLengthSnapshot() { return snapshot.getQueueLength(); } @@ -407,6 +408,7 @@ public class NodeProvisioner { * The number of idle executors for this {@link #getLabel()} * @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getAvailableExecutors()} */ + @Deprecated public int getIdleSnapshot() { return snapshot.getAvailableExecutors(); } @@ -415,6 +417,7 @@ public class NodeProvisioner { * The total number of executors for this {@link #getLabel()} * @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getOnlineExecutors()} */ + @Deprecated public int getTotalSnapshot() { return snapshot.getOnlineExecutors(); } @@ -450,6 +453,7 @@ public class NodeProvisioner { * The time series average number of idle executors for this {@link #getLabel()} * @deprecated use {@link #getAvailableExecutorsLatest()} */ + @Deprecated public float getIdleLatest() { return getAvailableExecutorsLatest(); } @@ -458,6 +462,7 @@ public class NodeProvisioner { * The time series average total number of executors for this {@link #getLabel()} * @deprecated use {@link #getOnlineExecutorsLatest()} */ + @Deprecated public float getTotalLatest() { return getOnlineExecutorsLatest(); } diff --git a/core/src/main/java/hudson/slaves/RetentionStrategy.java b/core/src/main/java/hudson/slaves/RetentionStrategy.java index 06a3b992d5..106d1a90c2 100644 --- a/core/src/main/java/hudson/slaves/RetentionStrategy.java +++ b/core/src/main/java/hudson/slaves/RetentionStrategy.java @@ -115,6 +115,7 @@ public abstract class RetentionStrategy extends AbstractDesc * @deprecated as of 1.286 * Use {@link #all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final DescriptorList> LIST = new DescriptorList>((Class)RetentionStrategy.class); /** diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 6d4b2a9142..658c5777c7 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -633,6 +633,7 @@ public class SlaveComputer extends Computer { * This URL binding is no longer used and moved up directly under to {@link jenkins.model.Jenkins}, * but it's left here for now just in case some old JNLP slave agents request it. */ + @Deprecated public Slave.JnlpJar getJnlpJars(String fileName) { return new Slave.JnlpJar(fileName); } diff --git a/core/src/main/java/hudson/tasks/ArtifactArchiver.java b/core/src/main/java/hudson/tasks/ArtifactArchiver.java index 6a0b23d366..17ad02f7c5 100644 --- a/core/src/main/java/hudson/tasks/ArtifactArchiver.java +++ b/core/src/main/java/hudson/tasks/ArtifactArchiver.java @@ -282,6 +282,7 @@ public class ArtifactArchiver extends Recorder implements SimpleBuildStep { * Some plugin depends on this, so this field is left here and points to the last created instance. * Use {@link jenkins.model.Jenkins#getDescriptorByType(Class)} instead. */ + @Deprecated public static volatile DescriptorImpl DESCRIPTOR; @Extension diff --git a/core/src/main/java/hudson/tasks/BuildStep.java b/core/src/main/java/hudson/tasks/BuildStep.java index 699015f7f4..83b351673b 100644 --- a/core/src/main/java/hudson/tasks/BuildStep.java +++ b/core/src/main/java/hudson/tasks/BuildStep.java @@ -131,6 +131,7 @@ public interface BuildStep { * @deprecated as of 1.341. * Use {@link #getProjectActions(AbstractProject)} instead. */ + @Deprecated Action getProjectAction(AbstractProject project); /** @@ -230,6 +231,7 @@ public interface BuildStep { * Use {@link Builder#all()} for read access, and use * {@link Extension} for registration. */ + @Deprecated List> BUILDERS = new DescriptorList(Builder.class); /** @@ -246,6 +248,7 @@ public interface BuildStep { * Use {@link Publisher#all()} for read access, and use * {@link Extension} for registration. */ + @Deprecated PublisherList PUBLISHERS = new PublisherList(); /** diff --git a/core/src/main/java/hudson/tasks/BuildStepCompatibilityLayer.java b/core/src/main/java/hudson/tasks/BuildStepCompatibilityLayer.java index 11c39c21b6..4f2db842a8 100644 --- a/core/src/main/java/hudson/tasks/BuildStepCompatibilityLayer.java +++ b/core/src/main/java/hudson/tasks/BuildStepCompatibilityLayer.java @@ -49,6 +49,7 @@ import jenkins.tasks.SimpleBuildStep; * @since 1.150 * @deprecated since 1.150 */ +@Deprecated public abstract class BuildStepCompatibilityLayer implements BuildStep { // // new definitions >= 1.150 @@ -103,6 +104,7 @@ public abstract class BuildStepCompatibilityLayer implements BuildStep { * @deprecated * Use {@link #prebuild(AbstractBuild, BuildListener)} instead. */ + @Deprecated public boolean prebuild(Build build, BuildListener listener) { return true; } @@ -111,6 +113,7 @@ public abstract class BuildStepCompatibilityLayer implements BuildStep { * @deprecated * Use {@link #perform(AbstractBuild, Launcher, BuildListener)} instead. */ + @Deprecated public boolean perform(Build build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { throw new UnsupportedOperationException(); } @@ -119,6 +122,7 @@ public abstract class BuildStepCompatibilityLayer implements BuildStep { * @deprecated * Use {@link #getProjectAction(AbstractProject)} instead. */ + @Deprecated public Action getProjectAction(Project project) { return null; } diff --git a/core/src/main/java/hudson/tasks/BuildTrigger.java b/core/src/main/java/hudson/tasks/BuildTrigger.java index ee121ca195..75b1b68a01 100644 --- a/core/src/main/java/hudson/tasks/BuildTrigger.java +++ b/core/src/main/java/hudson/tasks/BuildTrigger.java @@ -144,6 +144,7 @@ public class BuildTrigger extends Recorder implements DependencyDeclarer { * @deprecated as of 1.406 * Use {@link #getChildProjects(ItemGroup)} */ + @Deprecated public List getChildProjects() { return getChildProjects(Jenkins.getInstance()); } @@ -172,6 +173,7 @@ public class BuildTrigger extends Recorder implements DependencyDeclarer { * @deprecated as of 1.406 * Use {@link #hasSame(AbstractProject, Collection)} */ + @Deprecated public boolean hasSame(Collection projects) { return hasSame(null,projects); } diff --git a/core/src/main/java/hudson/tasks/BuildWrapper.java b/core/src/main/java/hudson/tasks/BuildWrapper.java index 8b103e3bfd..3c2ac9c849 100644 --- a/core/src/main/java/hudson/tasks/BuildWrapper.java +++ b/core/src/main/java/hudson/tasks/BuildWrapper.java @@ -252,6 +252,7 @@ public abstract class BuildWrapper extends AbstractDescribableImpl * @deprecated * Use {@link #getProjectActions(AbstractProject)} instead. */ + @Deprecated public Action getProjectAction(AbstractProject job) { return null; } diff --git a/core/src/main/java/hudson/tasks/BuildWrappers.java b/core/src/main/java/hudson/tasks/BuildWrappers.java index 7778a1f11c..8a969c4ad6 100644 --- a/core/src/main/java/hudson/tasks/BuildWrappers.java +++ b/core/src/main/java/hudson/tasks/BuildWrappers.java @@ -44,6 +44,7 @@ public class BuildWrappers { * as of 1.281. Use {@link Extension} for registration, and use {@link BuildWrapper#all()} * for listing them. */ + @Deprecated public static final List> WRAPPERS = new DescriptorList(BuildWrapper.class); /** diff --git a/core/src/main/java/hudson/tasks/LogRotator.java b/core/src/main/java/hudson/tasks/LogRotator.java index 8797a334db..36efff2145 100644 --- a/core/src/main/java/hudson/tasks/LogRotator.java +++ b/core/src/main/java/hudson/tasks/LogRotator.java @@ -94,6 +94,7 @@ public class LogRotator extends BuildDiscarder { * @deprecated since 1.350. * Use {@link #LogRotator(int, int, int, int)} */ + @Deprecated public LogRotator(int daysToKeep, int numToKeep) { this(daysToKeep, numToKeep, -1, -1); } diff --git a/core/src/main/java/hudson/tasks/Maven.java b/core/src/main/java/hudson/tasks/Maven.java index 9515219b04..a1a37b34eb 100644 --- a/core/src/main/java/hudson/tasks/Maven.java +++ b/core/src/main/java/hudson/tasks/Maven.java @@ -385,6 +385,7 @@ public class Maven extends Builder { * For compatibility, this field retains the last created {@link DescriptorImpl}. * TODO: fix sonar plugin that depends on this. That's the only plugin that depends on this field. */ + @Deprecated public static DescriptorImpl DESCRIPTOR; @Extension @@ -466,6 +467,7 @@ public class Maven extends Builder { * @deprecated as of 1.308. * Use {@link #Maven.MavenInstallation(String, String, List)} */ + @Deprecated public MavenInstallation(String name, String home) { super(name, home); } @@ -480,6 +482,7 @@ public class Maven extends Builder { * * @deprecated as of 1.308. Use {@link #getHome()}. */ + @Deprecated public String getMavenHome() { return getHome(); } diff --git a/core/src/main/java/hudson/tasks/Shell.java b/core/src/main/java/hudson/tasks/Shell.java index 661f75e312..45d9c7d84c 100644 --- a/core/src/main/java/hudson/tasks/Shell.java +++ b/core/src/main/java/hudson/tasks/Shell.java @@ -125,6 +125,7 @@ public class Shell extends CommandInterpreter { * @deprecated 1.403 * Use {@link #getShellOrDefault(hudson.remoting.VirtualChannel) }. */ + @Deprecated public String getShellOrDefault() { if(shell==null) return Functions.isWindows() ?"sh":"/bin/sh"; diff --git a/core/src/main/java/hudson/tasks/UserNameResolver.java b/core/src/main/java/hudson/tasks/UserNameResolver.java index 71594caa0c..49e518a6c6 100644 --- a/core/src/main/java/hudson/tasks/UserNameResolver.java +++ b/core/src/main/java/hudson/tasks/UserNameResolver.java @@ -92,5 +92,6 @@ public abstract class UserNameResolver implements ExtensionPoint { * @deprecated since 2009-02-24. * Use {@link #all()} for read access, and use {@link Extension} for registration. */ + @Deprecated public static final List LIST = ExtensionListView.createList(UserNameResolver.class); } diff --git a/core/src/main/java/hudson/tools/ToolInstallation.java b/core/src/main/java/hudson/tools/ToolInstallation.java index 0ba5dd730c..a14fed1c1b 100644 --- a/core/src/main/java/hudson/tools/ToolInstallation.java +++ b/core/src/main/java/hudson/tools/ToolInstallation.java @@ -90,6 +90,7 @@ public abstract class ToolInstallation extends AbstractDescribableImpl { * @deprecated since 2009-04-09. * Use {@link ToolInstallation#translateFor(Node,TaskListener)} */ + @Deprecated public static String getToolHome(Node node, ToolInstallation installation, TaskListener log) throws IOException, InterruptedException { String result = null; diff --git a/core/src/main/java/hudson/triggers/SCMTrigger.java b/core/src/main/java/hudson/triggers/SCMTrigger.java index b07eb95f55..c1b2dde483 100644 --- a/core/src/main/java/hudson/triggers/SCMTrigger.java +++ b/core/src/main/java/hudson/triggers/SCMTrigger.java @@ -600,6 +600,7 @@ public class SCMTrigger extends Trigger { * @deprecated * Use {@link #SCMTrigger.SCMTriggerCause(String)}. */ + @Deprecated public SCMTriggerCause() { this(""); } diff --git a/core/src/main/java/hudson/triggers/Trigger.java b/core/src/main/java/hudson/triggers/Trigger.java index 32b4d9b5bc..6f5c922d26 100644 --- a/core/src/main/java/hudson/triggers/Trigger.java +++ b/core/src/main/java/hudson/triggers/Trigger.java @@ -120,6 +120,7 @@ public abstract class Trigger implements Describable> * @deprecated as of 1.341 * Use {@link #getProjectActions()} instead. */ + @Deprecated public Action getProjectAction() { return null; } diff --git a/core/src/main/java/hudson/triggers/Triggers.java b/core/src/main/java/hudson/triggers/Triggers.java index 746ced5028..04c04d8546 100644 --- a/core/src/main/java/hudson/triggers/Triggers.java +++ b/core/src/main/java/hudson/triggers/Triggers.java @@ -36,12 +36,14 @@ import java.util.List; * @deprecated as of 1.286 * See each member for how to migrate your code. */ +@Deprecated public class Triggers { /** * All registered {@link TriggerDescriptor} implementations. * @deprecated as of 1.286 * Use {@link Trigger#all()} for read access, and {@link Extension} for registration. */ + @Deprecated public static final List TRIGGERS = (List)new DescriptorList>((Class)Trigger.class); // Descriptor.toList( // SCMTrigger.DESCRIPTOR, @@ -54,6 +56,7 @@ public class Triggers { * @deprecated as of 1.286 * Use {@link Trigger#for_(Item)}. */ + @Deprecated public static List getApplicableTriggers(Item i) { return Trigger.for_(i); } diff --git a/core/src/main/java/hudson/util/ByteBuffer.java b/core/src/main/java/hudson/util/ByteBuffer.java index ee1f16f47e..8281ce25c6 100644 --- a/core/src/main/java/hudson/util/ByteBuffer.java +++ b/core/src/main/java/hudson/util/ByteBuffer.java @@ -37,6 +37,7 @@ import java.io.InputStream; * @author Kohsuke Kawaguchi * @deprecated since 2008-05-28. Moved to stapler */ +@Deprecated public class ByteBuffer extends OutputStream { private byte[] buf = new byte[8192]; /** diff --git a/core/src/main/java/hudson/util/CharSpool.java b/core/src/main/java/hudson/util/CharSpool.java index 45d28ddb78..c27a74cb6f 100644 --- a/core/src/main/java/hudson/util/CharSpool.java +++ b/core/src/main/java/hudson/util/CharSpool.java @@ -34,6 +34,7 @@ import java.util.List; * @author Kohsuke Kawaguchi * @deprecated since 2008-05-28. moved to stapler */ +@Deprecated public final class CharSpool extends Writer { private List buf; diff --git a/core/src/main/java/hudson/util/ChartUtil.java b/core/src/main/java/hudson/util/ChartUtil.java index 3d6903ea08..e6a14cc8d8 100644 --- a/core/src/main/java/hudson/util/ChartUtil.java +++ b/core/src/main/java/hudson/util/ChartUtil.java @@ -100,6 +100,7 @@ public class ChartUtil { * @deprecated * Use {@code awtProblemCause!=null} instead. As of 1.267. */ + @Deprecated public static boolean awtProblem = false; /** @@ -117,6 +118,7 @@ public class ChartUtil { * Bind {@link Graph} to the URL space. See {@code hudson.tasks.junit.History} as an example (note that doing so involves * a bit of URL structure change.) */ + @Deprecated public static void generateGraph(StaplerRequest req, StaplerResponse rsp, JFreeChart chart, Area defaultSize) throws IOException { generateGraph(req,rsp,chart,defaultSize.width, defaultSize.height); } @@ -132,6 +134,7 @@ public class ChartUtil { * Bind {@link Graph} to the URL space. See {@code hudson.tasks.junit.History} as an example (note that doing so involves * a bit of URL structure change.) */ + @Deprecated public static void generateGraph(StaplerRequest req, StaplerResponse rsp, final JFreeChart chart, int defaultW, int defaultH) throws IOException { new Graph(-1,defaultW,defaultH) { protected JFreeChart createGraph() { @@ -147,6 +150,7 @@ public class ChartUtil { * Bind {@link Graph} to the URL space. See {@code hudson.tasks.junit.History} as an example (note that doing so involves * a bit of URL structure change.) */ + @Deprecated public static void generateClickableMap(StaplerRequest req, StaplerResponse rsp, JFreeChart chart, Area defaultSize) throws IOException { generateClickableMap(req,rsp,chart,defaultSize.width,defaultSize.height); } @@ -158,6 +162,7 @@ public class ChartUtil { * Bind {@link Graph} to the URL space. See {@code hudson.tasks.junit.History} as an example (note that doing so involves * a bit of URL structure change.) */ + @Deprecated public static void generateClickableMap(StaplerRequest req, StaplerResponse rsp, final JFreeChart chart, int defaultW, int defaultH) throws IOException { new Graph(-1,defaultW,defaultH) { protected JFreeChart createGraph() { diff --git a/core/src/main/java/hudson/util/DescribableList.java b/core/src/main/java/hudson/util/DescribableList.java index 9ba34d5faf..66c60e4435 100644 --- a/core/src/main/java/hudson/util/DescribableList.java +++ b/core/src/main/java/hudson/util/DescribableList.java @@ -71,6 +71,7 @@ public class DescribableList, D extends Descriptor> * @deprecated since 2008-08-15. * Use {@link #DescribableList(Saveable)} */ + @Deprecated public DescribableList(Owner owner) { setOwner(owner); } @@ -88,6 +89,7 @@ public class DescribableList, D extends Descriptor> * @deprecated since 2008-08-15. * Use {@link #setOwner(Saveable)} */ + @Deprecated public void setOwner(Owner owner) { this.owner = owner; } @@ -189,6 +191,7 @@ public class DescribableList, D extends Descriptor> * @deprecated as of 1.271 * Use {@link #rebuild(StaplerRequest, JSONObject, List)} instead. */ + @Deprecated public void rebuild(StaplerRequest req, JSONObject json, List> descriptors, String prefix) throws FormException, IOException { rebuild(req,json,descriptors); } @@ -239,6 +242,7 @@ public class DescribableList, D extends Descriptor> * @deprecated since 2008-08-15. * Just implement {@link Saveable}. */ + @Deprecated public interface Owner extends Saveable { } diff --git a/core/src/main/java/hudson/util/DescriptorList.java b/core/src/main/java/hudson/util/DescriptorList.java index 88003c687f..f7f716860f 100644 --- a/core/src/main/java/hudson/util/DescriptorList.java +++ b/core/src/main/java/hudson/util/DescriptorList.java @@ -78,6 +78,7 @@ public final class DescriptorList> extends AbstractList * @deprecated * As of 1.286. Use {@link #DescriptorList(Class)} instead. */ + @Deprecated public DescriptorList(Descriptor... descriptors) { this.type = null; this.legacy = new CopyOnWriteArrayList>(descriptors); @@ -114,6 +115,7 @@ public final class DescriptorList> extends AbstractList * instead of registering a descriptor manually. */ @Override + @Deprecated public boolean add(Descriptor d) { return store().add(d); } @@ -126,6 +128,7 @@ public final class DescriptorList> extends AbstractList * instead of registering a descriptor manually. */ @Override + @Deprecated public void add(int index, Descriptor element) { add(element); // order is ignored } diff --git a/core/src/main/java/hudson/util/FormFieldValidator.java b/core/src/main/java/hudson/util/FormFieldValidator.java index d344dd43d5..a1932c6dc6 100644 --- a/core/src/main/java/hudson/util/FormFieldValidator.java +++ b/core/src/main/java/hudson/util/FormFieldValidator.java @@ -61,6 +61,7 @@ import org.kohsuke.stapler.Stapler; * @deprecated as of 1.294 * Use {@link FormValidation} as a return value in your check method. */ +@Deprecated public abstract class FormFieldValidator { public static final Permission CHECK = Jenkins.ADMINISTER; @@ -92,6 +93,7 @@ public abstract class FormFieldValidator { * Use {@link #FormFieldValidator(Permission)} and remove {@link StaplerRequest} and {@link StaplerResponse} * from your "doCheck..." method parameter */ + @Deprecated protected FormFieldValidator(StaplerRequest request, StaplerResponse response, Permission permission) { this(request,response, Jenkins.getInstance(),permission); } @@ -109,6 +111,7 @@ public abstract class FormFieldValidator { * Use {@link #FormFieldValidator(AccessControlled,Permission)} and remove {@link StaplerRequest} and {@link StaplerResponse} * from your "doCheck..." method parameter */ + @Deprecated protected FormFieldValidator(StaplerRequest request, StaplerResponse response, AccessControlled subject, Permission permission) { this.request = request; this.response = response; @@ -239,6 +242,7 @@ public abstract class FormFieldValidator { * @deprecated as of 1.294 * Use {@link FormValidation.URLCheck} */ + @Deprecated public static abstract class URLCheck extends FormFieldValidator { public URLCheck(StaplerRequest request, StaplerResponse response) { @@ -348,6 +352,7 @@ public abstract class FormFieldValidator { * @since 1.90. * @deprecated as of 1.294. Use {@link FilePath#validateFileMask(String, boolean)} */ + @Deprecated public static class WorkspaceFileMask extends FormFieldValidator { private final boolean errorIfNotExist; @@ -401,6 +406,7 @@ public abstract class FormFieldValidator { * @deprecated as of 1.294. Use {@link FilePath#validateRelativeDirectory(String, boolean)} * (see javadoc plugin for the example) */ + @Deprecated public static class WorkspaceDirectory extends WorkspaceFilePath { public WorkspaceDirectory(StaplerRequest request, StaplerResponse response, boolean errorIfNotExist) { super(request, response, errorIfNotExist, false); @@ -417,6 +423,7 @@ public abstract class FormFieldValidator { * @since 1.160 * @deprecated as of 1.294. Use {@link FilePath#validateRelativePath(String, boolean, boolean)} */ + @Deprecated public static class WorkspaceFilePath extends FormFieldValidator { private final boolean errorIfNotExist; private final boolean expectingFile; @@ -500,6 +507,7 @@ public abstract class FormFieldValidator { * @since 1.124 * @deprecated as of 1.294. Use {@link FormValidation#validateExecutable(String)} */ + @Deprecated public static class Executable extends FormFieldValidator { public Executable(StaplerRequest request, StaplerResponse response) { @@ -586,6 +594,7 @@ public abstract class FormFieldValidator { * @deprecated as of 1.305 * Use {@link FormValidation#validateBase64(String, boolean, boolean, String)} instead. */ + @Deprecated public static class Base64 extends FormFieldValidator { private final boolean allowWhitespace; private final boolean allowEmpty; @@ -632,6 +641,7 @@ public abstract class FormFieldValidator { * @deprecated as of 1.294 * Use {@link FormValidation#validateNonNegativeInteger(String)} */ + @Deprecated public static class NonNegativeInteger extends FormFieldValidator { public NonNegativeInteger() { super(null); diff --git a/core/src/main/java/hudson/util/IOUtils.java b/core/src/main/java/hudson/util/IOUtils.java index e88013c701..b8edc31242 100644 --- a/core/src/main/java/hudson/util/IOUtils.java +++ b/core/src/main/java/hudson/util/IOUtils.java @@ -149,31 +149,37 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#DIR_SEPARATOR_UNIX} */ + @Deprecated public static final char DIR_SEPARATOR_UNIX = org.apache.commons.io.IOUtils.DIR_SEPARATOR_UNIX; /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#DIR_SEPARATOR_WINDOWS} */ + @Deprecated public static final char DIR_SEPARATOR_WINDOWS = org.apache.commons.io.IOUtils.DIR_SEPARATOR_WINDOWS; /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#DIR_SEPARATOR} */ + @Deprecated public static final char DIR_SEPARATOR = org.apache.commons.io.IOUtils.DIR_SEPARATOR; /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#LINE_SEPARATOR_UNIX} */ + @Deprecated public static final String LINE_SEPARATOR_UNIX = org.apache.commons.io.IOUtils.LINE_SEPARATOR_UNIX; /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#LINE_SEPARATOR_WINDOWS} */ + @Deprecated public static final String LINE_SEPARATOR_WINDOWS = org.apache.commons.io.IOUtils.LINE_SEPARATOR_WINDOWS; /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#LINE_SEPARATOR} */ + @Deprecated public static final String LINE_SEPARATOR; static { @@ -187,6 +193,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#closeQuietly(java.io.Reader)} */ + @Deprecated public static void closeQuietly(Reader input) { org.apache.commons.io.IOUtils.closeQuietly(input); } @@ -194,6 +201,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#closeQuietly(java.io.Writer)} */ + @Deprecated public static void closeQuietly(Writer output) { org.apache.commons.io.IOUtils.closeQuietly(output); } @@ -201,6 +209,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#closeQuietly(java.io.InputStream)} */ + @Deprecated public static void closeQuietly(InputStream input) { org.apache.commons.io.IOUtils.closeQuietly(input); } @@ -208,6 +217,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#closeQuietly(java.io.OutputStream)} */ + @Deprecated public static void closeQuietly(OutputStream output) { org.apache.commons.io.IOUtils.closeQuietly(output); } @@ -215,6 +225,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toByteArray(java.io.InputStream)} */ + @Deprecated public static byte[] toByteArray(InputStream input) throws IOException { return org.apache.commons.io.IOUtils.toByteArray(input); } @@ -222,6 +233,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toByteArray(java.io.Reader)} */ + @Deprecated public static byte[] toByteArray(Reader input) throws IOException { return org.apache.commons.io.IOUtils.toByteArray(input); } @@ -229,6 +241,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toByteArray(java.io.Reader, String)} */ + @Deprecated public static byte[] toByteArray(Reader input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.toByteArray(input, encoding); } @@ -236,6 +249,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toByteArray(String)} */ + @Deprecated public static byte[] toByteArray(String input) throws IOException { return org.apache.commons.io.IOUtils.toByteArray(input); } @@ -243,6 +257,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toCharArray(java.io.InputStream)} */ + @Deprecated public static char[] toCharArray(InputStream is) throws IOException { return org.apache.commons.io.IOUtils.toCharArray(is); } @@ -250,6 +265,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toCharArray(java.io.InputStream, String)} */ + @Deprecated public static char[] toCharArray(InputStream is, String encoding) throws IOException { return org.apache.commons.io.IOUtils.toCharArray(is, encoding); } @@ -257,6 +273,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toCharArray(java.io.Reader)} */ + @Deprecated public static char[] toCharArray(Reader input) throws IOException { return org.apache.commons.io.IOUtils.toCharArray(input); } @@ -264,6 +281,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toString(java.io.InputStream)} */ + @Deprecated public static String toString(InputStream input) throws IOException { return org.apache.commons.io.IOUtils.toString(input); } @@ -271,6 +289,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toString(java.io.InputStream, String)} */ + @Deprecated public static String toString(InputStream input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.toString(input, encoding); } @@ -278,6 +297,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toString(java.io.Reader)} */ + @Deprecated public static String toString(Reader input) throws IOException { return org.apache.commons.io.IOUtils.toString(input); } @@ -285,6 +305,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toString(byte[])} */ + @Deprecated public static String toString(byte[] input) throws IOException { return org.apache.commons.io.IOUtils.toString(input); } @@ -292,6 +313,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toString(byte[], String)} */ + @Deprecated public static String toString(byte[] input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.toString(input, encoding); } @@ -299,6 +321,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#readLines(java.io.InputStream)} */ + @Deprecated public static List readLines(InputStream input) throws IOException { return org.apache.commons.io.IOUtils.readLines(input); } @@ -306,6 +329,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#readLines(java.io.InputStream, String)} */ + @Deprecated public static List readLines(InputStream input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.readLines(input, encoding); } @@ -313,6 +337,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#readLines(java.io.Reader)} */ + @Deprecated public static List readLines(Reader input) throws IOException { return org.apache.commons.io.IOUtils.readLines(input); } @@ -320,6 +345,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#lineIterator(java.io.Reader)} */ + @Deprecated public static LineIterator lineIterator(Reader reader) { return org.apache.commons.io.IOUtils.lineIterator(reader); } @@ -327,6 +353,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#lineIterator(java.io.InputStream, String)} */ + @Deprecated public static LineIterator lineIterator(InputStream input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.lineIterator(input, encoding); } @@ -334,6 +361,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toInputStream(String)} */ + @Deprecated public static InputStream toInputStream(String input) { return org.apache.commons.io.IOUtils.toInputStream(input); } @@ -341,6 +369,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#toInputStream(String, String)} */ + @Deprecated public static InputStream toInputStream(String input, String encoding) throws IOException { return org.apache.commons.io.IOUtils.toInputStream(input, encoding); } @@ -348,6 +377,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(byte[], java.io.OutputStream)} */ + @Deprecated public static void write(byte[] data, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -355,6 +385,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(byte[], java.io.Writer)} */ + @Deprecated public static void write(byte[] data, Writer output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -362,6 +393,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(byte[], java.io.Writer, String)} */ + @Deprecated public static void write(byte[] data, Writer output, String encoding) throws IOException { org.apache.commons.io.IOUtils.write(data, output, encoding); } @@ -369,6 +401,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(char[], java.io.OutputStream)} */ + @Deprecated public static void write(char[] data, Writer output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -376,6 +409,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(char[], java.io.OutputStream)} */ + @Deprecated public static void write(char[] data, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -383,6 +417,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(char[], java.io.OutputStream, String)} */ + @Deprecated public static void write(char[] data, OutputStream output, String encoding) throws IOException { org.apache.commons.io.IOUtils.write(data, output, encoding); } @@ -390,6 +425,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(char[], java.io.Writer)} */ + @Deprecated public static void write(String data, Writer output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -397,6 +433,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(String, java.io.OutputStream)} */ + @Deprecated public static void write(String data, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -404,6 +441,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(String, java.io.OutputStream, String)} */ + @Deprecated public static void write(String data, OutputStream output, String encoding) throws IOException { org.apache.commons.io.IOUtils.write(data, output, encoding); } @@ -411,6 +449,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(StringBuffer, java.io.Writer)} */ + @Deprecated public static void write(StringBuffer data, Writer output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -418,6 +457,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(StringBuffer, java.io.OutputStream)} */ + @Deprecated public static void write(StringBuffer data, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.write(data, output); } @@ -425,6 +465,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#write(StringBuffer, java.io.OutputStream, String)} */ + @Deprecated public static void write(StringBuffer data, OutputStream output, String encoding) throws IOException { org.apache.commons.io.IOUtils.write(data, output, encoding); } @@ -432,6 +473,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#writeLines(java.util.Collection, String, java.io.OutputStream)} */ + @Deprecated public static void writeLines(Collection lines, String lineEnding, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.writeLines(lines, lineEnding, output); } @@ -439,6 +481,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#writeLines(java.util.Collection, String, java.io.OutputStream, String)} */ + @Deprecated public static void writeLines(Collection lines, String lineEnding, OutputStream output, String encoding) throws IOException { org.apache.commons.io.IOUtils.writeLines(lines, lineEnding, output, encoding); } @@ -446,6 +489,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#writeLines(java.util.Collection, String, java.io.Writer)} */ + @Deprecated public static void writeLines(Collection lines, String lineEnding, Writer writer) throws IOException { org.apache.commons.io.IOUtils.writeLines(lines, lineEnding, writer); } @@ -453,6 +497,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.InputStream, java.io.OutputStream)} */ + @Deprecated public static int copy(InputStream input, OutputStream output) throws IOException { return org.apache.commons.io.IOUtils.copy(input, output); } @@ -460,6 +505,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copyLarge(java.io.InputStream, java.io.OutputStream)} */ + @Deprecated public static long copyLarge(InputStream input, OutputStream output) throws IOException { return org.apache.commons.io.IOUtils.copyLarge(input, output); } @@ -467,6 +513,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.InputStream, java.io.Writer)} */ + @Deprecated public static void copy(InputStream input, Writer output) throws IOException { org.apache.commons.io.IOUtils.copy(input, output); } @@ -474,6 +521,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.InputStream, java.io.Writer, String)} */ + @Deprecated public static void copy(InputStream input, Writer output, String encoding) throws IOException { org.apache.commons.io.IOUtils.copy(input, output, encoding); } @@ -481,6 +529,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.Reader, java.io.Writer)} */ + @Deprecated public static int copy(Reader input, Writer output) throws IOException { return org.apache.commons.io.IOUtils.copy(input, output); } @@ -488,6 +537,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copyLarge(java.io.Reader, java.io.Writer)} */ + @Deprecated public static long copyLarge(Reader input, Writer output) throws IOException { return org.apache.commons.io.IOUtils.copyLarge(input, output); } @@ -495,6 +545,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.Reader, java.io.OutputStream)} */ + @Deprecated public static void copy(Reader input, OutputStream output) throws IOException { org.apache.commons.io.IOUtils.copy(input, output); } @@ -502,6 +553,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#copy(java.io.Reader, java.io.OutputStream, String)} */ + @Deprecated public static void copy(Reader input, OutputStream output, String encoding) throws IOException { org.apache.commons.io.IOUtils.copy(input, output, encoding); } @@ -509,6 +561,7 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#contentEquals(java.io.InputStream, java.io.InputStream)} */ + @Deprecated public static boolean contentEquals(InputStream input1, InputStream input2) throws IOException { return org.apache.commons.io.IOUtils.contentEquals(input1, input2); } @@ -516,9 +569,10 @@ public class IOUtils { /** * @deprecated Use instead {@link org.apache.commons.io.IOUtils#contentEquals(java.io.Reader, java.io.Reader)} */ + @Deprecated public static boolean contentEquals(Reader input1, Reader input2) throws IOException { return org.apache.commons.io.IOUtils.contentEquals(input1, input2); } private static final byte[] SKIP_BUFFER = new byte[8192]; -} \ No newline at end of file +} diff --git a/core/src/main/java/hudson/util/LineEndNormalizingWriter.java b/core/src/main/java/hudson/util/LineEndNormalizingWriter.java index e2f26e75f8..2a0edee1d0 100644 --- a/core/src/main/java/hudson/util/LineEndNormalizingWriter.java +++ b/core/src/main/java/hudson/util/LineEndNormalizingWriter.java @@ -39,6 +39,7 @@ import java.io.IOException; * @author Kohsuke Kawaguchi * @deprecated since 2008-05-28. moved to stapler */ +@Deprecated public class LineEndNormalizingWriter extends FilterWriter { private boolean seenCR; diff --git a/core/src/main/java/hudson/util/ListBoxModel.java b/core/src/main/java/hudson/util/ListBoxModel.java index 6fb0e53ff3..c880739b2c 100644 --- a/core/src/main/java/hudson/util/ListBoxModel.java +++ b/core/src/main/java/hudson/util/ListBoxModel.java @@ -176,6 +176,7 @@ public class ListBoxModel extends ArrayList implements Http * Exposed for stapler. Not meant for programatic consumption. */ @Exported + @Deprecated public Option[] values() { return toArray(new Option[size()]); } diff --git a/core/src/main/java/hudson/util/ProcessTreeKiller.java b/core/src/main/java/hudson/util/ProcessTreeKiller.java index 600b765bad..def30b10b4 100644 --- a/core/src/main/java/hudson/util/ProcessTreeKiller.java +++ b/core/src/main/java/hudson/util/ProcessTreeKiller.java @@ -35,12 +35,14 @@ import java.util.Map; * @since 1.201 * @deprecated as of 1.315. Use {@link ProcessTree}. */ +@Deprecated public final class ProcessTreeKiller { /** * Short for {@code kill(proc,null)} * * @deprecated Use {@link OSProcess#killRecursively()} */ + @Deprecated public void kill(Process proc) throws InterruptedException { kill(proc,null); } @@ -73,6 +75,7 @@ public final class ProcessTreeKiller { * If non-null, search-and-destroy will be performed. * @deprecated Use {@link ProcessTree#killAll(Map)} and {@link OSProcess#killRecursively()} */ + @Deprecated public void kill(Process proc, Map modelEnvVars) throws InterruptedException { ProcessTree pt = ProcessTree.get(); if(proc!=null) @@ -85,6 +88,7 @@ public final class ProcessTreeKiller { * Short for {@code kill(null,modelEnvVars)} * @deprecated Use {@link ProcessTree#killAll(Map)} */ + @Deprecated public void kill(Map modelEnvVars) throws InterruptedException { kill(null,modelEnvVars); } @@ -95,6 +99,7 @@ public final class ProcessTreeKiller { * * @deprecated Use {@link EnvVars#createCookie()} */ + @Deprecated public static EnvVars createCookie() { return EnvVars.createCookie(); } diff --git a/core/src/main/java/hudson/util/RunList.java b/core/src/main/java/hudson/util/RunList.java index 3b2c49ec43..f77232afcc 100644 --- a/core/src/main/java/hudson/util/RunList.java +++ b/core/src/main/java/hudson/util/RunList.java @@ -102,6 +102,7 @@ public class RunList extends AbstractList { * {@link RunList}, despite its name, should be really used as {@link Iterable}, not as {@link List}. */ @Override + @Deprecated public int size() { if (size==null) { int sz=0; @@ -119,6 +120,7 @@ public class RunList extends AbstractList { * {@link RunList}, despite its name, should be really used as {@link Iterable}, not as {@link List}. */ @Override + @Deprecated public R get(int index) { return Iterators.get(iterator(),index); } diff --git a/core/src/main/java/hudson/util/Secret.java b/core/src/main/java/hudson/util/Secret.java index 90144ed6af..80be75b8ff 100644 --- a/core/src/main/java/hudson/util/Secret.java +++ b/core/src/main/java/hudson/util/Secret.java @@ -73,6 +73,7 @@ public final class Secret implements Serializable { * Or if you really know what you are doing, use the {@link #getPlainText()} method. */ @Override + @Deprecated public String toString() { return value; } @@ -103,6 +104,7 @@ public final class Secret implements Serializable { * This is no longer the key we use to encrypt new information, but we still need this * to be able to decrypt what's already persisted. */ + @Deprecated /*package*/ static SecretKey getLegacyKey() throws GeneralSecurityException { String secret = SECRET; if(secret==null) return Jenkins.getInstance().getSecretKeyAsAES128(); diff --git a/core/src/main/java/hudson/util/StreamTaskListener.java b/core/src/main/java/hudson/util/StreamTaskListener.java index dd2f3b9d4b..4d6aea568d 100644 --- a/core/src/main/java/hudson/util/StreamTaskListener.java +++ b/core/src/main/java/hudson/util/StreamTaskListener.java @@ -65,6 +65,7 @@ public class StreamTaskListener extends AbstractTaskListener implements Serializ * the charset and output stream separately, so that this class can handle encoding correctly, * or use {@link #fromStdout()} or {@link #fromStderr()}. */ + @Deprecated public StreamTaskListener(PrintStream out) { this(out,null); } @@ -105,6 +106,7 @@ public class StreamTaskListener extends AbstractTaskListener implements Serializ * @deprecated as of 1.349 * Use {@link #NULL} */ + @Deprecated public StreamTaskListener() throws IOException { this(new NullStream()); } diff --git a/core/src/main/java/hudson/util/WriterOutputStream.java b/core/src/main/java/hudson/util/WriterOutputStream.java index 469b015db6..a73bbfa45f 100644 --- a/core/src/main/java/hudson/util/WriterOutputStream.java +++ b/core/src/main/java/hudson/util/WriterOutputStream.java @@ -41,6 +41,7 @@ import java.nio.*; * @deprecated since 2008-05-28. * Use the one in stapler. */ +@Deprecated public class WriterOutputStream extends OutputStream { private final Writer writer; private final CharsetDecoder decoder; diff --git a/core/src/main/java/hudson/util/xstream/MapperDelegate.java b/core/src/main/java/hudson/util/xstream/MapperDelegate.java index 1433687176..f7eb78b551 100644 --- a/core/src/main/java/hudson/util/xstream/MapperDelegate.java +++ b/core/src/main/java/hudson/util/xstream/MapperDelegate.java @@ -90,6 +90,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3, use {@link #getConverterFromItemType(String, Class, Class)} */ + @Deprecated public SingleValueConverter getConverterFromItemType(String fieldName, Class type) { return delegate.getConverterFromItemType(fieldName, type); } @@ -97,6 +98,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3, use {@link #getConverterFromItemType(String, Class, Class)} */ + @Deprecated public SingleValueConverter getConverterFromItemType(Class type) { return delegate.getConverterFromItemType(type); } @@ -104,6 +106,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3, use {@link #getConverterFromAttribute(Class, String, Class)} */ + @Deprecated public SingleValueConverter getConverterFromAttribute(String name) { return delegate.getConverterFromAttribute(name); } @@ -123,6 +126,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3, use combination of {@link #serializedMember(Class, String)} and {@link #getConverterFromItemType(String, Class, Class)} */ + @Deprecated public String aliasForAttribute(Class definedIn, String fieldName) { return delegate.aliasForAttribute(definedIn, fieldName); } @@ -130,6 +134,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3, use combination of {@link #realMember(Class, String)} and {@link #getConverterFromItemType(String, Class, Class)} */ + @Deprecated public String attributeForAlias(Class definedIn, String alias) { return delegate.attributeForAlias(definedIn, alias); } @@ -137,6 +142,7 @@ public class MapperDelegate extends MapperWrapper { /** * @deprecated since 1.3.1, use {@link #getConverterFromAttribute(Class, String, Class)} */ + @Deprecated public SingleValueConverter getConverterFromAttribute(Class type, String attribute) { return delegate.getConverterFromAttribute(type, attribute); } diff --git a/core/src/main/java/hudson/views/ListViewColumn.java b/core/src/main/java/hudson/views/ListViewColumn.java index c01321af08..4fd010d861 100644 --- a/core/src/main/java/hudson/views/ListViewColumn.java +++ b/core/src/main/java/hudson/views/ListViewColumn.java @@ -93,6 +93,7 @@ public abstract class ListViewColumn implements ExtensionPoint, Describable LIST = new DescriptorList(ListViewColumn.class); /** @@ -103,6 +104,7 @@ public abstract class ListViewColumn implements ExtensionPoint, Describable all() { diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java index d82a42e51a..cbf11e3fb3 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java @@ -72,6 +72,7 @@ public class JnlpSlaveAgentProtocol extends AgentProtocol { * @deprecated as of 1.559 * Use {@link #Handler(NioChannelHub, Socket)} */ + @Deprecated public Handler(Socket socket) throws IOException { this(null,socket); } diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java index 30993bc08b..cee4b6cbad 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java @@ -36,6 +36,7 @@ public class JnlpSlaveAgentProtocol2 extends JnlpSlaveAgentProtocol { * @deprecated as of 1.559 * Use {@link #Handler2(NioChannelHub, Socket)} */ + @Deprecated public Handler2(Socket socket) throws IOException { super(socket); } diff --git a/core/src/main/java/jenkins/util/AntClassLoader.java b/core/src/main/java/jenkins/util/AntClassLoader.java index 6416a57ddc..16c7c37474 100644 --- a/core/src/main/java/jenkins/util/AntClassLoader.java +++ b/core/src/main/java/jenkins/util/AntClassLoader.java @@ -582,6 +582,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener { * @deprecated since 1.6.x. * Use Class.forName with initialize=true instead. */ + @Deprecated public static void initializeClass(Class theClass) { // ***HACK*** We ask the VM to create an instance // by voluntarily providing illegal arguments to force