Deprecated API
Contents
-
ElementDescriptionRemove any code calling this method, history widget is now created via
WidgetFactory
implementation.
-
InterfaceDescriptionUse
DependencyDeclarer
instead.UseRunAction2
instead:RunAction.onLoad()
does not work well with lazy loading if you are trying to persist the owner; andRunAction.onBuildComplete()
was never called.ImplementSCMTriggerItem
instead.since 2008-08-15. Just implementSaveable
.useAuthentication
useAuthenticationManager
UseACL.as(User)
orSecurityContext
use TODO orGrantedAuthority
useAuthenticationProvider
useRememberMeServices
useUserDetails
insteaduseUserDetailsService
-
ClassDescriptionrather use
RunRangeCommand
No longer used.No longer used.No longer does anything. Only here to prevent errors from old versions of tools likeJenkinsRule
.Unused.as of 1.467 Please useRun.RunExecution
useBlockedBecauseOfBuildInProgress
instead.UseLabelValidator
instead.2008-07-20 UseACL
andItem.BUILD
. This code is only here for the backward compatibility.since 2.431since 2009-02-081.428 useCause.UserIdCause
Unused.only here for backward componly here for backward compsince 1.281implementQueue.Task
directlyimplementSubTask
directlyDoes not contribute toActionable.getActions()
. UseTransientActionFactory
instead.as of 1.399. Replaced byLauncher.RemoteLauncher.ProcImpl
No longer used.Only exists for backward compatibility.since 1.150as of 1.286 See each member for how to migrate your code.implementTaskListener
directlyImplementAdministrativeMonitor
directly instead.useString.CASE_INSENSITIVE_ORDER
directlyas of 1.294 UseFormValidation
as a return value in your check method.as of 1.305 UseFormValidation.validateBase64(String, boolean, boolean, String)
instead.as of 1.294. UseFormValidation.validateExecutable(String)
as of 1.294 UseFormValidation.validateNonNegativeInteger(String)
as of 1.294 UseFormValidation.URLCheck
as of 1.294. UseFilePath.validateRelativeDirectory(String, boolean)
(see javadoc plugin for the example)as of 1.294. UseFilePath.validateFileMask(String, boolean, boolean)
as of 1.294. UseFilePath.validateRelativePath(String, boolean, boolean)
No longer used.due to risk for file leak. PreferRewindableFileOutputStream
due to risk for file leak. PreferRewindableRotatingFileOutputStream
useServiceLoader
instead.Unused.useSystemProperties
directlyReplaced byCloudsLink
andCloudSet
.as of 1.576 UseBasicHeaderProcessor
This class no longer has any effect. Support for allowlistingCallable
s predating the introduction of theRoleSensitive
interface for SECURITY-144 in 2014 has been dropped.FilePath
no longer supports being invoked from agents at all, soFilePathFilter
etc. have been removed.only used with deprecated-jnlpUrl
modeUseSlaveToMasterCallable
instead (and only if you really have to), and think carefully about the security implications.New widgets should provide aWidgetFactory
instead of relying on this legacy lookup.UseACL.as(User)
orSecurityContext
.useSecurityContextImpl
use TODO orSimpleGrantedAuthority
useAbstractAuthenticationToken
useAnonymousAuthenticationToken
useAbstractUserDetailsAuthenticationProvider
useUsernamePasswordAuthenticationToken
useTokenBasedRememberMeServices
useWebAuthenticationDetails
useUser
useFieldUtils
-
Enum ClassDescription
-
ExceptionsDescriptionuse
IOException
Replaced by more genericCompositeIOException
.Just useIOException
, which since Java 6 supports a cause.useAccessDeniedException
useAccountExpiredException
useRuntimeException
useAuthenticationException
useAuthenticationServiceException
useBadCredentialsException
useCredentialsExpiredException
useDisabledException
useInsufficientAuthenticationException
useLockedException
useProviderNotFoundException
useUsernameNotFoundException
no replacementno replacementno replacement
-
FieldDescriptionNo longer used.as of 1.417 Use
ExtensionList.jenkins
useLogRecorderManager.getRecorders()
insteadJust useItem.CANCEL
.as of 2.0 Use injectionas of 1.286 UseItems.all()
for read access andExtension
for registration.as of 1.281 UseJobPropertyDescriptor.all()
for read access, andExtension
for registration.UseLabelExpressionLexer.VOCABULARY
instead.UseLabelExpressionParser.VOCABULARY
instead.as of 1.281 UseRunListener.all()
for read access, and useExtension
for registration.as of 1.377 The only implementation in the core now is the one based on consistent hash.useLoadStatistics.onlineExecutors
. NotetotalExecutors==onlineExecutors
for backward compatibility support.as of 1.286 UseManagementLink.all()
for read access and putExtension
for registration.as of 1.467 UseLoadStatistics.queueLength
. Left as an alias here for backward compatibility.as of 1.286 UsePageDecorator.all()
for read access, and useExtension
for registration.as of 1.286 UseParameterDefinition.all()
for read access, andExtension
for registration.Use your own logger, or send messages to the logger inAsyncPeriodicWork.execute(hudson.model.TaskListener)
.Unused.as of 1.485 UseComparator.reverseOrder()
as of 1.333 UseUpdateSite.neverUpdate
as of 1.286 UseView.all()
for read access, and useExtension
for registration.as of 2.0 Don't use this field, use injection.as of 1.286. UseNodeMonitor.all()
for read access andExtension
for registration.as of 2.0 use injectionas of 2.0 Use injectionin Jenkins 2.222 useJenkins.ADMINISTER
insteadas of 1.355PluginManager
can now live longer thanJenkins
instance, so useHudson.getInstance().servletContext
instead.in Jenkins 2.222 useJenkins.ADMINISTER
insteadUseCrontabLexer.VOCABULARY
instead.UseCrontabParser.VOCABULARY
instead.as of 1.286 UseChangeLogAnnotator.all()
for read access, andExtension
for registration.as of 1.286. UseRepositoryBrowser.all()
for read access andExtension
for registration.useACL.SYSTEM2
since 1.286 UseAuthorizationStrategy.all()
for read access, andExtension
for registration.as of 1.643 Inject descriptor viaInject
.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().manager
, so use that instead.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe
, so use that instead.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails
, so use that instead.as of 2.0 Don't use this field, use injection.since 2009-01-23. UseJenkins.ADMINISTER
.since 2009-01-23. AccessJenkins.ADMINISTER
instead.since 2009-01-23. AccessJenkins.PERMISSIONS
instead.as of 1.286 UseSecurityRealm.all()
for read access, and useExtension
for registration.as of 1.286 UseCloud.all()
for read access, andExtension
for registration.as of 1.281 UseExtension
for registration, and useJenkins.getDescriptorList(Class)
for read access.as of 1.XXX UseJenkins.getDescriptor(Class)
No longer used.as of 1.286 UseNodeDescriptor.all()
for read access, andExtension
for registration.as of 1.286 UseRetentionStrategy.all()
for read access, andExtension
for registration.as of 1.286 Some plugin depends on this, so this field is left here and points to the last created instance. UseJenkins.getDescriptorByType(Class)
instead.as of 1.286. UseBuilder.all()
for read access, and useExtension
for registration.as of 1.286. UsePublisher.all()
for read access, and useExtension
for registration.as of 1.281. UseExtension
for registration, and useBuildWrapper.all()
for listing them.as of 1.286 UseJenkins.getDescriptorByType(Class)
to obtain the current instance. For compatibility, this field retains the last createdMaven.DescriptorImpl
.since 2009-02-24. UseUserNameResolver.all()
for read access, and useExtension
for registration.UseTimer.get()
instead.as of 1.286 UseTrigger.all()
for read access, andExtension
for registration.UseawtProblemCause!=null
instead. As of 1.267.as of 1.281 UseListViewColumn.all()
for read access andExtension
for registration.unusedunusedas of 1.464 This flag will have no effect.No longer used.as of 1.558 UseFilePath.localChannel
as of 1.467 UseJenkins.unlabeledNodeProvisioner
. This was broken because it was tracking all the executors in the system, but it was only tracking free-roaming jobs in the queue. SoCloud
fails to launch nodes when you have some exclusive agents and free-roaming jobs in the queue.in Jenkins 2.222 useJenkins.ADMINISTER
insteadin favour ofNodes
only used for the migration of previous data
-
MethodDescriptionsince 2.163Specific to Remoting-based protocol.Specific to Remoting-based protocol.Specific to Remoting-based protocol.as of 1.632. Use
ConsoleLogFilter.decorateLogger(Run, OutputStream)
as of 1.416 UseExtensionList.create(Jenkins, Class)
Descriptor.getId()
is supposed to be used for new code, not the descriptor class name.as of 1.356 Use and implementExtensionFinder.find(Class,Hudson)
that allows us to put some metadata.since 2009-02-23. Prefer automatic registration.as of 1.416 UseExtensionList.create(Jenkins, Class)
as of 1.315. UseFilePath.zip(OutputStream)
that has more consistent name.as of 1.315 UseFilePath.zip(OutputStream,String)
that has more consistent name.useFilePath.validateAntFileMask(String, int)
insteadauto refresh has been removedThis is rather meaningless.as of 1.451 UseFunctions.getAvatar(hudson.model.User, java.lang.String)
as of 1.294 JEXL now supports the real ternary operator "x?y:z", so this work around is no longer necessary.Now always true.From JEXL expressions (${…}
) in*.jelly
files you can use[obj]
syntax to construct anObject[]
(which may be usable where aList
is expected) rather thanh.singletonList(obj)
.This functionality has been moved to ccxml plugin.since 2008-11-16. See the javadoc for why this is inherently unreliable. If you are trying to figure out the currentComputer
from within a build, useFilePath.toComputer()
orComputer.currentComputer()
.as of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.311 UseLauncher.launch()
and its associated builder patternas of 1.350. UseMarkupText.toString(boolean)
to be explicit about the escape mode.as of 1.489 UseAbstractBuild.doStop()
UseActionable.getAction(Class)
onAggregatedTestResultAction
.UseActionable.getAction(Class)
onAbstractTestResultAction
.navigation through a hierarchy should be done through breadcrumbs, do not add a link using this methodMaybe you were trying to callNode.getDisplayName()
.Why are you calling a method that always returns ""? You probably want to callJenkins.getRootUrl()
as of 1.473 UseAbstractItem.updateByXml(Source)
UseRequirePOST
on your method.UseLabelExpression.validate(String, Item)
instead.hudson.model.AbstractProject.buildDescribable(StaplerRequest, List<? extends Descriptor<T>>, String) As of 1.261. UseAbstractProject.buildDescribable(StaplerRequest2, List)
instead.as of 1.489 InjectTimeDuration
.as of 1.319 SeeAbstractProject.getWorkspace()
for a migration strategy.as of 1.319 SeeAbstractProject.getWorkspace()
for a migration strategy.as of 1.319 To support concurrent builds of the same project, this method is moved toAbstractBuild
. For backward compatibility, this method returns the rightAbstractBuild.getWorkspace()
if called fromExecutor
, and otherwise the workspace of the last build.If you are calling this method during a build from an executor, switch it to
AbstractBuild.getWorkspace()
. If you are calling this method to serve a file from the workspace, doing a form validation, etc., then useAbstractProject.getSomeWorkspace()
as of 1.319 Projects no longer have a fixed workspace, ands builds will find an available workspace viaWorkspaceList
for each build (furthermore, that happens after a build is started.) So aResource
representation for a workspace at the project level no longer makes sense.If you need to lock a workspace while you do some computation, see the source code of
AbstractProject.pollSCMChanges(TaskListener)
for how to obtain a lock of a workspace throughWorkspaceList
.as of 1.346 UseAbstractProject.poll(TaskListener)
instead.No clear purpose, since subclasses may have overriddenActionable.getActions()
, and does not considerTransientActionFactory
.Normally outside code should not call this method any more. UseActionable.getAllActions()
, orActionable.addAction(hudson.model.Action)
, orActionable.replaceAction(hudson.model.Action)
. May still be called for compatibility reasons from subclasses predatingTransientActionFactory
.Callers should useAdministrativeMonitor.checkRequiredPermission()
orAdministrativeMonitor.hasRequiredPermission()
.as of 1.467 Override theBuild.run()
method by callingRun.execute(hudson.model.Run.RunExecution)
with proper execution object.UseBuildableItem.scheduleBuild(Cause)
. Since 1.283UseBuildableItem.scheduleBuild(int, Cause)
. Since 1.283as of 1.288 but left here for backward compatibility.Implementation of CLI command "connect-node" moved toConnectNodeCommand
.Implementation of CLI command "disconnect-node" moved toDisconnectNodeCommand
.Implementation of CLI command "offline-node" moved toOfflineNodeCommand
.Implementation of CLI command "online-node" moved toOnlineNodeCommand
.as of 1.320. UseComputer.disconnect(OfflineCause)
and specify the cause.as of 1.292 UseComputer.getEnvironment()
instead.since 2008-05-18. See Computer.isLaunchSupported() and ComputerLauncherYou should almost always wantComputer.isOffline()
. This method is marked as deprecated to warn people when they accidentally call this method.since 2009-01-06. UseComputer.connect(boolean)
as of 1.320. UseComputer.setTemporaryOfflineCause(OfflineCause)
UseComputer.setTemporaryOfflineCause(OfflineCause)
instead.UseComputerSet.getComputers()
instead.as of 1.301 UseComputerSet.getMonitors()
.since 1.341; useDependencyGraph.addDependency(Dependency)
since 1.341since 1.341As of 1.239, useDescriptor.configure(StaplerRequest2, JSONObject)
.since 1.528 UseDescriptor.getCheckMethod(String)
ImplementDescriptor.newInstance(StaplerRequest, JSONObject)
method instead. Deprecated as of 1.145.as of 1.297 Instead of calling this method explicitly, just return theDirectoryBrowserSupport
object from thedoXYZ
method and let Stapler generate a response for you.browser-based download has been disabledas of 1.489 UseExecutor.doStop()
orExecutor.doStopBuild(String)
.now a no-opno longer usedcallQueue.Executable.getEstimatedDuration()
directlysince 2007-12-18. UseAccessControlled.checkPermission(hudson.security.Permission)
since 2007-12-18. UseAccessControlled.checkPermission(hudson.security.Permission)
as of 1.324 Either use client-side validation (e.g. class="required number") or define your own check method, instead of relying on this generic one.as of 1.294 Define your own check method, instead of relying on this generic one.As on 1.267, moved to "/log/rss..."as of 1.317 UseJenkins.doQuietDown()
instead.as of 1.286. UseComputerListener.all()
.Here only for compatibility. UseJenkins.get()
instead.Left only for the compatibility of URLs. Should not be invoked for any other purpose.Used only for mapping jobs to URL in a case-insensitive fashion.as of 1.286. UseItemListener.all()
.UseJenkins.getNode(String)
. Since 1.252.UseJenkins.getNodes()
. Since 1.252.since 2007-12-18. This method is deprecated when Hudson moved from simple Unix root-like model of "admin gets to do everything, and others don't have any privilege" to more complexACL
andPermission
based scheme.For a quick migration, use
Hudson.getInstance().getACL().hasPermission(Hudson.ADMINISTER)
To check if the user has the 'administer' role in Hudson.But ideally, your plugin should first identify a suitable
Permission
(or create one, if appropriate), then identify a suitableAccessControlled
object to check its permission against.since 2007-12-18. Define a customPermission
and check against ACL. SeeHudson.isAdmin()
for more instructions.UseJenkins.setNodes(List)
. Since 1.252.This method shall NEVER be used during HTML page rendering, as it won't work with network set up like Apache reverse proxy. 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.)as of 1.406 UseItems.fromNameList(ItemGroup, String, Class)
Underspecified what the parameter is.Descriptor.getId()
? ADescribable
class name?as of 1.460. UseJDK.buildEnvVars(EnvVars)
as of 1.304 UseToolInstallation.getHome()
Remove any override, history widget is now created viaWidgetFactory
implementation.Exists for backwards compatibility, useAbstractItem.doConfirmRename(java.lang.String)
instead.as of 1.372. Should just dogetBuilds().byTimestamp(s,e)
to avoid code bloat inJob
.as of 1.503 UseJob.getBuildDiscarder()
.as of 1.503 UseJob.setBuildDiscarder(BuildDiscarder)
as of 1.341. OverrideJobProperty.getJobActions(Job)
instead.as of 1.286 putExtension
on your class to have it auto-registered.as of 1.281 PutExtension
on your class to get it auto-registered.as of 1.281 PutExtension
on your class to get it auto-registered.UseExtension
instead.UseExtension
instead.as of 1.391 UseListViewColumn.createDefaultInitialColumnList()
Status filter is now controlled via aViewJobFilter
, seeStatusFilter
Status filter is now controlled via aViewJobFilter
, seeStatusFilter
useLoadStatistics.idleExecutors
directly.as of 1.413 UseNode.canTake(Queue.BuildableItem)
to indicate that this method isn't really meant to be called by random code.UseParameterValue.buildEnvironment(Run, EnvVars)
instead.as of 1.344 UseParameterValue.buildEnvironment(Run, EnvVars)
instead.since 2008-09-20. parameter definition may change any time. So if you find yourself in need of accessing the information fromParameterDefinition
, instead copy them inParameterDefinition.createValue(StaplerRequest2, JSONObject)
intoParameterValue
.as of 1.290 UsegetPublishersList().add(x)
as of 1.463 We will be soon removing the restriction that only one instance of publisher is allowed per type. UseProject.getPublishersList()
instead.as of 1.290 UsegetPublishersList().remove(x)
Use Integer.compare instead. sign(a-b).Use Long.compare instead. sign(a-b).as of 1.311 UseQueue.schedule(AbstractProject)
as of 1.311 UseQueue.schedule(Task, int)
as of 1.311 UseQueue.schedule(Task, int)
as of 1.311 UseQueue.schedule(Task, int, Action...)
callQueue.Executable.getEstimatedDuration()
directlyUseQueue.getItems()
directly. As of 1.607 the approximation is no longer needed.UseQueue.isBlockedByShutdown(hudson.model.Queue.Task)
instead.UseQueue.doCancelItem(long)
instead.discards information; preferQueue.JobOffer.getCauseOfBlockage(hudson.model.Queue.BuildableItem)
as of 1.380 UseLoadPredictor.predict(MappingWorksheet, Computer, long, long)
since 1.413 UseQueueTaskDispatcher.canTake(Node, Queue.BuildableItem)
as of 1.521 UseQueue.schedule2(Task, int, List)
Unused.as of 1.330 UseCauseOfBlockage.getShortDescription()
instead.UseQueue.Task.getCauseOfBlockage()
!= nullcallQueue.Task.getDefaultAuthentication()
directlycallQueue.Task.getDefaultAuthentication(Item)
directlycallSubTask.getOwnerTask()
directlycallSubTask.getSameNodeConstraint()
directlycallQueue.Task.getSubTasks()
directlyMay not be meaningful with custom artifact managers. UseArtifactManager.root()
plusVirtualFile.child(java.lang.String)
withRun.Artifact.relativePath
instead.as of 1.352 UsegetLogText().doProgressiveText(req,rsp)
This method shall NEVER be used during HTML page rendering, as it's too easy for misconfiguration to break this value, with network set up like Apache reverse proxy. This method is only intended for the remote API clients who cannot resolve relative references.Should only be used fromStandardArtifactManager
or subclasses.as of 1.305 useRun.getEnvironment(TaskListener)
as of 1.292 UseRun.getEnvironment(TaskListener)
instead.since 2007-11-11. UseRun.getLog(int)
instead as it avoids loading the whole log into memory unnecessarily.Assumes file-based storage of the log, which is not necessarily the case for Pipelines after JEP-210. Use other methods giving various kinds of streams such asRun.getLogReader()
,Run.getLogInputStream()
, orRun.getLogText()
.UseActionable.getAllActions()
instead.as of 1.467 UseRun.execute(hudson.model.Run.RunExecution)
After JENKINS-37862 this no longer does anything.as of 1.485 UseRunMap(File, Constructor)
as of 1.346 UseSCMedItem.poll(TaskListener)
instead.Removed with no replacementRemoved with no replacementas of 1.350 UseTaskAction.obtainLog()
, which returns the same object in a more type-safe signature.as of Hudson 1.350 UseTaskThread.ListenerAndText.forFile(File, TaskAction)
and pass in the callingTaskAction
as of Hudson 1.350 UseTaskThread.ListenerAndText.forMemory(TaskAction)
and pass in the callingTaskAction
as of 1.390 UseTopLevelItemDescriptor.newInstance(ItemGroup, String)
since 2007-01-19. This is not a valid operation forItem
s.as of 1.461 Override and callTransientBuildActionFactory.createFor(Run)
instead.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.as of 1.333 With the introduction of multiple update center capability, this information is now a part of theupdate-center.json
file. Seehttp://jenkins-ci.org/update-center.json
as an example.as of 1.333update-center.json
is now signed, so we don't have to further make sure that we aren't downloading from anywhere unsecure.as of 1.333 With the introduction of multiple update center capability, this information is now moved toUpdateSite
.as of 1.326 UseUpdateCenter.UpdateCenterJob.submit()
instead.Exposed only for UI.useUpdateSite.getJsonSignatureValidator(String)
instead.as of 1.326 UseUpdateSite.Plugin.deploy()
.removed without replacementThis method is deprecated, because it causes unexpectedUser
creation by API usage code and causes performance degradation of used to retrieve users by ID. UseUser.getById(java.lang.String, boolean)
when you know you have an ID. Otherwise useUser.getOrCreateByIdOrFullName(String)
orUser.get(String, boolean, Map)
.This should only be used when the core requirement is below the version this method was addedUseView.getQueueItems()
. As of 1.607 the approximation is no longer needed.callViewGroup.getItemGroup()
directlycallViewGroup.getPrimaryView()
directlycallViewGroup.getViewActions()
directlyAuto-refresh has been removedDoes not work properly with moved jobs. UseItemListener.onLocationChanged(hudson.model.Item, java.lang.String, java.lang.String)
instead.This method does nothing and should not be usedas of 1.320 UseAbstractNodeMonitorDescriptor.markOffline(Computer, OfflineCause)
to specify the cause.Directly use the size field or to get a human-readable value with units useFunctions.humanReadableByteSize(long)
as of 1.305 overridePlugin.configure(StaplerRequest2,JSONObject)
insteadUseServiceLoader
instead, or (more commonly)ExtensionList
.removed without replacementPlease usePluginWrapper.getDependents()
.For most purposes, usePluginWrapper.getDisplayName()
.Please usePluginWrapper.getOptionalDependents()
.Please usePluginWrapper.hasDependents()
.Please usePluginWrapper.hasOptionalDependents()
.removed without replacementas of 1.286 Prefer automatic registration viaExtension
since 2008-06-19. UseRepositoryBrowsers.createInstance(Class, StaplerRequest2, JSONObject, String)
.in favor ofSCM.buildEnvironment(Run, Map)
.since 1.382 Use/overrideSCM.getModuleRoot(FilePath, AbstractBuild)
instead.as of 1.382. Use/derive fromSCM.getModuleRoots(FilePath, AbstractBuild)
instead.as of 1.345 OverrideSCM.calcRevisionsFromBuild(AbstractBuild, Launcher, TaskListener)
andSCM.compareRemoteRevisionWith(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)
for implementation. The implementation is now separated in two pieces, one that computes the revision of the current workspace, and the other that computes the revision of the remote repository. CallSCM.poll(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)
for use instead.No longer used by default.No longer used by default.No longer used by default.SCM.getKey()
could be used to implement similar features if needed.as of 1.294 UseSCMS.parseSCM(StaplerRequest2, AbstractProject)
and pass in the caller's project type.use try with resources andACL.as2(Authentication)
use try with resources andACL.as2(Authentication)
use try with resources andACL.as2(Authentication)
since 1.277 OverrideAuthorizationStrategy.getACL(Job)
instead.No longer used.hudson.slaves.Channels.newJVM(String, TaskListener, FilePath, ClasspathBuilder, Map<String, String>) removed without replacementremoved without replacementUseCloud.canProvision(CloudState)
instead.UseCloud.provision(CloudState, int)
instead.as of 1.304 UseComputerLauncher.afterDisconnect(SlaveComputer, TaskListener)
as of 1.304 UseComputerLauncher.beforeDisconnect(SlaveComputer, TaskListener)
as of 1.304 UseComputerLauncher.launch(SlaveComputer, TaskListener)
since 1.571. UseComputerListener.onOffline(Computer, OfflineCause)
instead.as of 1.292 UseComputerListener.onOnline(Computer, TaskListener)
as of 1.286 putExtension
on your class to have it auto-registered.as of 1.413 UseNodeProperty.canTake(Queue.BuildableItem)
UseAgentComputerUtil.getChannelToController()
instead.since 2008-08-18. This URL binding is no longer used and moved up directly under toJenkins
, but it's left here for now just in case some old inbound agents request it.since 2008-05-20.UseStaplerRequest.getSubmittedForm()
. Since 1.238.as of 1.341. UseBuildStep.getProjectActions(AbstractProject)
instead.since 1.341; useBuildTrigger.execute(AbstractBuild,BuildListener)
as of 1.406 UseBuildTrigger.getChildProjects(ItemGroup)
apparently unusedas of 1.406 UseBuildTrigger.hasSame(AbstractProject, Collection)
Does not handle folder moves.since 2007-10-28. UseBuildWrapper.Environment.tearDown(AbstractBuild, BuildListener)
instead.UseBuildWrapper.getProjectActions(AbstractProject)
instead.since 2007-10-28. UseBuildWrapper.setUp(AbstractBuild, Launcher, BuildListener)
instead.as of 1.308. UseToolInstallation.getHome()
.since 1.150since 1.150since 2009-04-09. UseToolInstallation.translateFor(Node,TaskListener)
as of 1.341 UseTrigger.getProjectActions()
instead.as of 1.286 UseTrigger.for_(Item)
.Use getTemporaryPath()as of 1.320 BindGraph
to the URL space. Seehudson.tasks.junit.History
as an example (note that doing so involves a bit of URL structure change.)as of 1.320 BindGraph
to the URL space. Seehudson.tasks.junit.History
as an example (note that doing so involves a bit of URL structure change.)as of 1.320 BindGraph
to the URL space. Seehudson.tasks.junit.History
as an example (note that doing so involves a bit of URL structure change.)as of 1.320 BindGraph
to the URL space. Seehudson.tasks.junit.History
as an example (note that doing so involves a bit of URL structure change.)Use individual localization methods instead. SeeMessages.Util_year(Object)
for an example. Deprecated since 2009-06-24, remove method after 2009-12-24.removed without replacementsince 2.335; useFiles.copy(Path, Path, CopyOption...)
directlyUseIOUtils.copy(InputStream, OutputStream)
UseIOUtils.copy(Reader, Writer)
UseIOUtils.copy(InputStream, OutputStream)
in atry
-with-resources blockUseIOUtils.copy(Reader, Writer)
in atry
-with-resources blockas of 1.271 UseDescribableList.rebuild(StaplerRequest2, JSONObject, List)
instead.since 2008-08-15. UsePersistedList.setOwner(Saveable)
As of 1.286. PutExtension
on your descriptor to have it auto-registered, instead of registering a descriptor manually.As of 1.286. PutExtension
on your descriptor to have it auto-registered, instead of registering a descriptor manually.Underspecified what the parameter is.Descriptor.getId()
? ADescribable
class name?since 2008-05-13. This method is broken (see JENKINS-1666). It should probably be removed but I'm not sure if it is considered part of the public API that needs to be maintained for backwards compatibility. UseUtil.encode(String)
instead.useFormApply.showNotification(String, NotificationType)
instead, which is CSP compatible versionActually identical toUtil.getTimeSpanString(long)
, does not addago
.Use Java 7try
-with-resources instead.Use Java 7try
-with-resources instead.Use Java 7try
-with-resources instead.Use Java 7try
-with-resources instead.Use insteadIOUtils.contentEquals(java.io.InputStream, java.io.InputStream)
Use insteadIOUtils.contentEquals(java.io.Reader, java.io.Reader)
Use insteadIOUtils.copy(java.io.InputStream, java.io.OutputStream)
Use insteadIOUtils.copy(java.io.InputStream, java.io.Writer)
Use insteadIOUtils.copy(java.io.InputStream, java.io.Writer, String)
Use insteadIOUtils.copy(java.io.Reader, java.io.OutputStream)
Use insteadIOUtils.copy(java.io.Reader, java.io.OutputStream, String)
Use insteadIOUtils.copy(java.io.Reader, java.io.Writer)
Use insteadIOUtils.copyLarge(java.io.InputStream, java.io.OutputStream)
Use insteadIOUtils.copyLarge(java.io.Reader, java.io.Writer)
Use insteadIOUtils.lineIterator(java.io.InputStream, String)
Use insteadIOUtils.lineIterator(java.io.Reader)
Use insteadIOUtils.readLines(java.io.InputStream)
Use insteadIOUtils.readLines(java.io.InputStream, String)
Use insteadIOUtils.readLines(java.io.Reader)
useIOUtils.skipFully(InputStream, long)
Use insteadIOUtils.toByteArray(java.io.InputStream)
Use insteadIOUtils.toByteArray(java.io.Reader)
Use insteadIOUtils.toByteArray(java.io.Reader, String)
Use insteadIOUtils.toByteArray(String)
Use insteadIOUtils.toCharArray(java.io.InputStream)
Use insteadIOUtils.toCharArray(java.io.InputStream, String)
Use insteadIOUtils.toCharArray(java.io.Reader)
Use insteadIOUtils.toInputStream(String)
Use insteadIOUtils.toInputStream(String, String)
Use insteadIOUtils.toString(byte[])
Use insteadIOUtils.toString(byte[], String)
Use insteadIOUtils.toString(java.io.InputStream)
Use insteadIOUtils.toString(java.io.InputStream, String)
Use insteadIOUtils.toString(java.io.Reader)
Use insteadIOUtils.write(byte[], java.io.OutputStream)
Use insteadIOUtils.write(byte[], java.io.Writer)
Use insteadIOUtils.write(byte[], java.io.Writer, String)
Use insteadIOUtils.write(char[], java.io.OutputStream)
Use insteadIOUtils.write(char[], java.io.OutputStream, String)
Use insteadIOUtils.write(char[], java.io.OutputStream)
Use insteadIOUtils.write(StringBuffer, java.io.OutputStream)
Use insteadIOUtils.write(StringBuffer, java.io.OutputStream, String)
Use insteadIOUtils.write(StringBuffer, java.io.Writer)
Use insteadIOUtils.write(String, java.io.OutputStream)
Use insteadIOUtils.write(String, java.io.OutputStream, String)
Use insteadIOUtils.write(char[], java.io.Writer)
Use insteadIOUtils.writeLines(java.util.Collection, String, java.io.OutputStream)
Use insteadIOUtils.writeLines(java.util.Collection, String, java.io.OutputStream, String)
Use insteadIOUtils.writeLines(java.util.Collection, String, java.io.Writer)
UseUtil.isSafeToRedirectTo(java.lang.String)
instead if your goal is to prevent open redirectsUseFiles.readAttributes(java.nio.file.Path, java.lang.Class<A>, java.nio.file.LinkOption...)
withDosFileAttributes
and reflective calls to WindowsFileAttributes if necessary.UseUtil.isSymlink(java.io.File)
to detect symbolic links and junctions instead.since 2.292; useString.join(CharSequence, Iterable)
Exposed for stapler. Not meant for programmatic consumption.callUtil.loadFile(java.io.File, java.nio.charset.Charset)
instead to specify the charset to use for decoding (preferablyStandardCharsets.UTF_8
).as of 1.456 UseUtil.resolveSymlink(File)
seeRunList.size()
for why this violates lazy-loadingas of 1.356 UseSecret.toString(Secret)
to avoid NPE in case Secret is null. Or if you really know what you are doing, use theSecret.getPlainText()
method.since 1.3, use combination ofMapperDelegate.serializedMember(Class, String)
andMapperDelegate.getConverterFromItemType(String, Class, Class)
since 1.3, use combination ofMapperDelegate.realMember(Class, String)
andMapperDelegate.getConverterFromItemType(String, Class, Class)
since 1.3.1, useMapperDelegate.getConverterFromAttribute(Class, String, Class)
Uses default encoding yet fails to write an encoding header. PreferXStream2.toXMLUTF8(java.lang.Object, java.io.OutputStream)
.as of 1.342. UseListViewColumnDescriptor.shownByDefault()
no longer usedno longer usedno longer usedno longer usedsince 2.324, useExtensionList.lookupSingleton(FileFingerprintStorage.class)
instead.Should no longer be used, asJenkins
now saves onlyInstallState.name
.No current use.Use only for migrating to new format. After the migration an id is no longer represented by a filename (directory).No current use.since 2.267; useJenkins.doQuietDown(boolean, int, String, boolean)
instead.useJenkins.doQuietDown(boolean, int, String, boolean)
instead.useJenkins.doSafeRestart(StaplerRequest2, String)
instead.1.512This is a verbose historical alias forJenkins.get()
.UI method. Not meant to be used programmatically.This is a historical alias forJenkins.getInstanceOrNull()
but with ambiguous nullability. UseJenkins.get()
in typical cases.This method will ignore Maven and matrix projects, as well as projects inside containers such as folders. You may prefer to callItemGroup.getAllItems(Class)
onAbstractProject
, perhaps also usingUtil.createSubList(java.util.Collection<?>, java.lang.Class<T>)
to consider onlyTopLevelItem
s. (That will also consider the caller's permissions.) If you really want to get justProject
s at top level, ignoring permissions, you can filter the values fromJenkins.getItemMap()
usingUtil.createSubList(java.util.Collection<?>, java.lang.Class<T>)
.UseSCMListener.all()
instead.Due to the past security advisory, this value should not be used any more to protect sensitive information. SeeConfidentialStore
andConfidentialKey
for how to store secrets.useJenkins.safeRestart(String)
instead.No longer does anything.Remove any code calling this method, history widget is now created viaWidgetFactory
implementation.No longer used.useApiTokenStats.load(User)
instead The method will be removed in a later version as it's an internal oneEach token can be revoked now and new tokens can be requested without altering existing ones.useTimeDuration.getTimeInMillis()
instead. This method has always returned a time in milliseconds, when various callers incorrectly assumed seconds. And this spread through the codebase. So this has been deprecated for clarity in favour of more explicitly named methods.useVirtualFile.list(String, String, boolean)
instead
-
ConstructorDescriptionas of 1.416 Use
DescriptorExtensionList(Jenkins, Class)
as of 1.416 UseExtensionList(Jenkins, Class)
as of 1.416 UseExtensionList(Jenkins, Class, CopyOnWriteArrayList)
since 2009-02-28as of 1.390since 2008-10-18. UseHealthReport(int, org.jvnet.localizer.Localizable)
since 2008-10-18. UseHealthReport(int, String, org.jvnet.localizer.Localizable)
since 2009-04-05. UseMultiStageTimeSeries(Localizable, Color, float, float)
as of 1.425 Use the default constructor that's less error pronePreferParameterDefinition(String)
with aDataBoundConstructor
and allowParameterDefinition.setDescription(java.lang.String)
to be used as neededas of 1.485 UseRunMap(Job, Constructor)
.as of 1.517PreferSimpleParameterDefinition(String)
with aDataBoundConstructor
and allowParameterDefinition.setDescription(java.lang.String)
to be used as neededsince 2009-02-20.as of 2.2 UseSlave(String, String, ComputerLauncher)
and set the rest through setters.since 2.184as of TODO The caller should useStreamBuildListener(OutputStream, Charset)
to pass in the charset and output stream separately, so that this class can handle encoding correctly.as of 1.349 The caller should useStreamBuildListener(OutputStream, Charset)
to pass in the charset and output stream separately, so that this class can handle encoding correctly.as of 1.442as of 1.390as of 1.522 Extend fromAbstractAsyncNodeMonitorDescriptor
as of 1.522 Extend fromAbstractAsyncNodeMonitorDescriptor
as of 1.522 Extend fromAbstractAsyncNodeMonitorDescriptor
as of 1.522 Extend fromAbstractAsyncNodeMonitorDescriptor
Use more modern APIs rather than subclassing.since 1.257. UsePermission(PermissionGroup, String, Localizable, Permission)
since 2.184since 2.184as of 2.2. UseDumbSlave(String, String, ComputerLauncher)
and configure the rest through setters.no useful properties, useJNLPLauncher()
no useful properties, useJNLPLauncher()
no useful properties, useJNLPLauncher()
no useful properties, useJNLPLauncher()
since 1.350. UseLogRotator(int, int, int, int)
as of 1.308. UseMavenInstallation(String, String, List)
as of 1.302. UseToolInstallation(String, String, List)
since 2.21since 2008-08-15. UseDescribableList(Saveable)
As of 1.286. UseDescriptorList(Class)
instead.UseFormFieldValidator(AccessControlled,Permission)
and removeStaplerRequest
andStaplerResponse
from your "doCheck..." method parameterUseFormFieldValidator(Permission)
and removeStaplerRequest
andStaplerResponse
from your "doCheck..." method parameteras of 1.349 UseTaskListener.NULL
as of TODO The caller should useStreamTaskListener(File, Charset)
to pass in the charset and file separately, so that this class can handle encoding correctly.as of TODO The caller should useStreamTaskListener(OutputStream, Charset)
to pass in the charset and output stream separately, so that this class can handle encoding correctly, or useStreamTaskListener.fromStdout()
orStreamTaskListener.fromStderr()
.as of 1.349 The caller should useStreamTaskListener(OutputStream, Charset)
to pass in the charset and output stream separately, so that this class can handle encoding correctly, or useStreamTaskListener.fromStdout()
orStreamTaskListener.fromStderr()
.UseSimpleBuildWrapper.createContext()
instead, so that this context can tell whether or not a disposer will require a workspace context.
WidgetFactory
implementation.