From 90f2d5e3dd943c15a8b9a15bffdb0939ccfa258b Mon Sep 17 00:00:00 2001 From: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Date: Tue, 23 Feb 2021 09:13:23 +0100 Subject: [PATCH] Add at-since annotations up to 2.279 (#5276) Co-authored-by: Daniel Beck --- core/src/main/java/hudson/Util.java | 2 +- core/src/main/java/hudson/WebAppMain.java | 2 +- core/src/main/java/hudson/cli/CLICommand.java | 4 ++-- .../hudson/model/AdministrativeMonitor.java | 2 +- .../main/java/hudson/model/Fingerprint.java | 2 +- core/src/main/java/hudson/model/Items.java | 6 +++--- core/src/main/java/hudson/model/Queue.java | 6 +++--- core/src/main/java/hudson/model/Result.java | 2 +- .../main/java/hudson/model/UpdateSite.java | 4 ++-- core/src/main/java/hudson/model/User.java | 6 +++--- .../main/java/hudson/model/queue/Tasks.java | 2 +- core/src/main/java/hudson/security/ACL.java | 20 +++++++++---------- .../main/java/hudson/security/ACLContext.java | 2 +- .../AbstractPasswordBasedSecurityRealm.java | 2 +- .../hudson/security/AccessControlled.java | 2 +- .../security/AccessDeniedException3.java | 2 +- .../security/HudsonPrivateSecurityRealm.java | 2 +- .../java/hudson/security/SecurityRealm.java | 20 +++++++++---------- .../UserMayOrMayNotExistException2.java | 2 +- core/src/main/java/hudson/slaves/Cloud.java | 2 +- core/src/main/java/hudson/util/Digester2.java | 4 ++-- .../src/main/java/hudson/util/DirScanner.java | 2 +- .../hudson/util/RingBufferLogHandler.java | 2 +- core/src/main/java/hudson/util/RunList.java | 2 +- .../java/jenkins/install/SetupWizard.java | 2 +- core/src/main/java/jenkins/model/Jenkins.java | 10 +++++----- .../security/BasicHeaderAuthenticator.java | 2 +- .../ImpersonatingExecutorService.java | 2 +- ...ImpersonatingScheduledExecutorService.java | 2 +- .../LastGrantedAuthoritiesProperty.java | 2 +- .../security/QueueItemAuthenticator.java | 4 ++-- .../jenkins/security/SecurityListener.java | 4 ++-- .../apitoken/TokenUuidAndPlainValue.java | 2 +- .../java/jenkins/tasks/SimpleBuildStep.java | 4 ++-- .../jenkins/tasks/SimpleBuildWrapper.java | 8 ++++---- .../main/java/jenkins/util/VirtualFile.java | 4 ++-- .../main/java/jenkins/util/xml/XMLUtils.java | 4 ++-- .../acls/sid/GrantedAuthoritySid.java | 2 +- .../acegisecurity/acls/sid/PrincipalSid.java | 2 +- 39 files changed, 78 insertions(+), 78 deletions(-) diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 0b24f7713f..4308cdbc03 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -1474,7 +1474,7 @@ public class Util { * @throws IllegalArgumentException When {@code derived} does not derive from {@code base}, or when {@code base} * does not contain the specified method. * @throws AbstractMethodError If the derived class doesn't override the given method. - * @since TODO + * @since 2.259 */ public static T ifOverridden(Supplier supplier, @NonNull Class base, @NonNull Class derived, @NonNull String methodName, @NonNull Class... types) { if (isOverridden(base, derived, methodName, types)) { diff --git a/core/src/main/java/hudson/WebAppMain.java b/core/src/main/java/hudson/WebAppMain.java index afab9573fa..d96fce2e5f 100644 --- a/core/src/main/java/hudson/WebAppMain.java +++ b/core/src/main/java/hudson/WebAppMain.java @@ -123,7 +123,7 @@ public class WebAppMain implements ServletContextListener { * Written for the requirements of JENKINS-50669 * @return int This returns DEFAULT_RING_BUFFER_SIZE * @see JENKINS-50669 - * @since TODO + * @since 2.259 */ public static int getDefaultRingBufferSize() { return RingBufferLogHandler.getDefaultRingBufferSize(); diff --git a/core/src/main/java/hudson/cli/CLICommand.java b/core/src/main/java/hudson/cli/CLICommand.java index 77440d3e89..d0c9825768 100644 --- a/core/src/main/java/hudson/cli/CLICommand.java +++ b/core/src/main/java/hudson/cli/CLICommand.java @@ -331,7 +331,7 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable { * *

* If the transport doesn't do authentication, this method returns {@link jenkins.model.Jenkins#ANONYMOUS2}. - * @since TODO + * @since 2.266 */ public Authentication getTransportAuthentication2() { Authentication a = transportAuth; @@ -348,7 +348,7 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable { } /** - * @since TODO + * @since 2.266 */ public void setTransportAuth2(Authentication transportAuth) { this.transportAuth = transportAuth; diff --git a/core/src/main/java/hudson/model/AdministrativeMonitor.java b/core/src/main/java/hudson/model/AdministrativeMonitor.java index 50fd164ce7..7d4d7efe4c 100644 --- a/core/src/main/java/hudson/model/AdministrativeMonitor.java +++ b/core/src/main/java/hudson/model/AdministrativeMonitor.java @@ -162,7 +162,7 @@ public abstract class AdministrativeMonitor extends AbstractModelObject implemen * * This will be used to determine which icon will be used in the navigation bar. * - * @since TODO + * @since 2.267 */ public boolean isSecurity() { return false; diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index 1665fef823..8331654c36 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -773,7 +773,7 @@ public class Fingerprint implements ModelObject, Saveable { /** * Converter Implementation for RangeSet. * - * @since TODO + * @since 2.253 */ public static final class ConverterImpl implements Converter { private final Converter collectionConv; // used to convert ArrayList in it diff --git a/core/src/main/java/hudson/model/Items.java b/core/src/main/java/hudson/model/Items.java index 14108a6041..d80ad97e6a 100644 --- a/core/src/main/java/hudson/model/Items.java +++ b/core/src/main/java/hudson/model/Items.java @@ -166,7 +166,7 @@ public class Items { * Returns all the registered {@link TopLevelItemDescriptor}s that the specified security principal is allowed to * create within the specified item group. * - * @since TODO + * @since 2.266 */ public static List all2(Authentication a, ItemGroup c) { List result = new ArrayList<>(); @@ -488,7 +488,7 @@ public class Items { * @param type the type. * @param the type. * @return An {@link Iterable} for all items. - * @since TODO + * @since 2.266 */ public static Iterable allItems2(Authentication authentication, ItemGroup root, Class type) { return allItems2(authentication, root, type, t -> true); @@ -516,7 +516,7 @@ public class Items { * @param the type. * @param pred the predicate. * @return An {@link Iterable} for all items. - * @since TODO + * @since 2.266 */ public static Iterable allItems2(Authentication authentication, ItemGroup root, Class type, Predicate pred) { return new AllItemsIterable<>(root, authentication, type, pred); diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 0449dcc0b9..be01fd56bb 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -1985,7 +1985,7 @@ public class Queue extends ResourceController implements Saveable { * based on whether this {@link Authentication} is allowed to use them. * * @return by default, {@link ACL#SYSTEM2} - * @since TODO + * @since 2.266 * @see QueueItemAuthenticator * @see Tasks#getDefaultAuthenticationOf(Queue.Task) */ @@ -2019,7 +2019,7 @@ public class Queue extends ResourceController implements Saveable { * older versions of Jenkins may not have this method implemented. Called private method _getDefaultAuthenticationOf(Task) on {@link Tasks} * to avoid {@link AbstractMethodError}. * - * @since TODO + * @since 2.266 * @see QueueItemAuthenticator * @see Tasks#getDefaultAuthenticationOf(Queue.Task, Queue.Item) */ @@ -2330,7 +2330,7 @@ public class Queue extends ResourceController implements Saveable { * return the identity of the user who queued the task, or {@link ACL#SYSTEM2} to bypass the access control * and run as the super user. * - * @since TODO + * @since 2.266 */ @NonNull public Authentication authenticate2() { diff --git a/core/src/main/java/hudson/model/Result.java b/core/src/main/java/hudson/model/Result.java index 548ccfa902..da80df7d49 100644 --- a/core/src/main/java/hudson/model/Result.java +++ b/core/src/main/java/hudson/model/Result.java @@ -124,7 +124,7 @@ public final class Result implements Serializable, CustomExportedBean { * @param r2 * a result (may be {@code null}) * @return the worst result (may be {@code null}) - * @since TODO + * @since 2.257 */ public static Result combine(Result r1, Result r2) { if (r1 == null) { diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 83eeab93f6..ba0b2e5be5 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -1514,7 +1514,7 @@ public class UpdateSite { /** * Checks whether a plugin has a desired category - * @since TODO + * @since 2.272 */ public boolean hasCategory(String category) { if (categories == null) { @@ -1526,7 +1526,7 @@ public class UpdateSite { /** * Get categories stream for further search. - * @since TODO + * @since 2.272 */ public Stream getCategoriesStream() { return categories != null ? Arrays.stream(categories) : Stream.empty(); diff --git a/core/src/main/java/hudson/model/User.java b/core/src/main/java/hudson/model/User.java index 06b2effca4..d0ee070d44 100644 --- a/core/src/main/java/hudson/model/User.java +++ b/core/src/main/java/hudson/model/User.java @@ -361,7 +361,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr * logged in. * * @throws UsernameNotFoundException If this user is not a valid user in the backend {@link SecurityRealm}. - * @since TODO + * @since 2.266 */ public @NonNull Authentication impersonate2() throws UsernameNotFoundException { return this.impersonate(this.getUserDetailsForImpersonation2()); @@ -388,7 +388,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr * * @return userDetails for the user, in case he's not found but seems legitimate, we provide a userDetails with minimum access * @throws UsernameNotFoundException If this user is not a valid user in the backend {@link SecurityRealm}. - * @since TODO + * @since 2.266 */ public @NonNull UserDetails getUserDetailsForImpersonation2() throws UsernameNotFoundException { ImpersonatingUserDetailsService2 userDetailsService = new ImpersonatingUserDetailsService2( @@ -596,7 +596,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr * * @param a the supplied {@link Authentication} . * @return a {@link User} object for the supplied {@link Authentication} or {@code null} - * @since TODO + * @since 2.266 */ public static @CheckForNull User get2(@CheckForNull Authentication a) { if (a == null || a instanceof AnonymousAuthenticationToken) diff --git a/core/src/main/java/hudson/model/queue/Tasks.java b/core/src/main/java/hudson/model/queue/Tasks.java index 470cfb11d2..af26411c29 100644 --- a/core/src/main/java/hudson/model/queue/Tasks.java +++ b/core/src/main/java/hudson/model/queue/Tasks.java @@ -99,7 +99,7 @@ public class Tasks { * in case some {@link QueueItemAuthenticator#authenticate2(hudson.model.Queue.Item)} takes (for example) actions into consideration. * @param t a task * @return an authentication as specified by some {@link QueueItemAuthenticator#authenticate2(hudson.model.Queue.Task)}; else {@link Task#getDefaultAuthentication2()} - * @since TODO + * @since 2.266 */ public static @NonNull Authentication getAuthenticationOf2(@NonNull Task t) { for (QueueItemAuthenticator qia : QueueItemAuthenticatorProvider.authenticators()) { diff --git a/core/src/main/java/hudson/security/ACL.java b/core/src/main/java/hudson/security/ACL.java index e1412e5809..cf4260035c 100644 --- a/core/src/main/java/hudson/security/ACL.java +++ b/core/src/main/java/hudson/security/ACL.java @@ -170,7 +170,7 @@ public abstract class ACL { *

* Note that {@link #SYSTEM2} can be passed in as the authentication parameter, * in which case you should probably just assume it has every permission. - * @since TODO + * @since 2.266 */ public boolean hasPermission2(@NonNull Authentication a, @NonNull Permission permission) { if (Util.isOverridden(ACL.class, getClass(), "hasPermission", org.acegisecurity.Authentication.class, Permission.class)) { @@ -192,7 +192,7 @@ public abstract class ACL { * Creates a simple {@link ACL} implementation based on a “single-abstract-method” easily implemented via lambda syntax. * @param impl the implementation of {@link ACL#hasPermission2(Authentication, Permission)} * @return an adapter to that lambda - * @since TODO + * @since 2.266 */ public static ACL lambda2(final BiFunction impl) { return new ACL() { @@ -249,7 +249,7 @@ public abstract class ACL { * @param d the descriptor of the item to be created. * @return false * if the user doesn't have the permission. - * @since TODO + * @since 2.266 */ public boolean hasCreatePermission2(@NonNull Authentication a, @NonNull ItemGroup c, @NonNull TopLevelItemDescriptor d) { @@ -302,7 +302,7 @@ public abstract class ACL { * @param d the descriptor of the view to be created. * @return false * if the user doesn't have the permission. - * @since TODO + * @since 2.266 */ public boolean hasCreatePermission2(@NonNull Authentication a, @NonNull ViewGroup c, @NonNull ViewDescriptor d) { @@ -368,7 +368,7 @@ public abstract class ACL { *

* This is used when Hudson is performing computation for itself, instead * of acting on behalf of an user, such as doing builds. - * @since TODO + * @since 2.266 */ public static final Authentication SYSTEM2 = new UsernamePasswordAuthenticationToken(SYSTEM_USERNAME,"SYSTEM"); @@ -390,7 +390,7 @@ public abstract class ACL { *

* We need to create a new {@link SecurityContext} instead of {@link SecurityContext#setAuthentication(Authentication)} * because the same {@link SecurityContext} object is reused for all the concurrent requests from the same session. - * @since TODO + * @since 2.266 * @deprecated use try with resources and {@link #as2(Authentication)} */ @Deprecated @@ -413,7 +413,7 @@ public abstract class ACL { * Safer variant of {@link #impersonate2(Authentication)} that does not require a finally-block. * @param auth authentication, such as {@link #SYSTEM2} * @param body an action to run with this alternate authentication in effect - * @since TODO + * @since 2.266 * @deprecated use try with resources and {@link #as2(Authentication)} */ @Deprecated @@ -439,7 +439,7 @@ public abstract class ACL { * Safer variant of {@link #impersonate2(Authentication)} that does not require a finally-block. * @param auth authentication, such as {@link #SYSTEM2} * @param body an action to run with this alternate authentication in effect (try {@link NotReallyRoleSensitiveCallable}) - * @since TODO + * @since 2.266 * @deprecated use try with resources and {@link #as2(Authentication)} */ @Deprecated @@ -474,7 +474,7 @@ public abstract class ACL { * * @param auth the new authentication. * @return the previous authentication context - * @since TODO + * @since 2.266 */ @NonNull public static ACLContext as2(@NonNull Authentication auth) { @@ -518,7 +518,7 @@ public abstract class ACL { * Checks if the given authentication is anonymous by checking its class. * @see Jenkins#ANONYMOUS2 * @see AnonymousAuthenticationToken - * @since TODO + * @since 2.266 */ public static boolean isAnonymous2(@NonNull Authentication authentication) { //TODO use AuthenticationTrustResolver instead to be consistent through the application diff --git a/core/src/main/java/hudson/security/ACLContext.java b/core/src/main/java/hudson/security/ACLContext.java index a090c90291..e5b49ff324 100644 --- a/core/src/main/java/hudson/security/ACLContext.java +++ b/core/src/main/java/hudson/security/ACLContext.java @@ -52,7 +52,7 @@ public class ACLContext implements AutoCloseable { /** * Accessor for the previous context. * @return the previous context. - * @since TODO + * @since 2.266 */ @NonNull public SecurityContext getPreviousContext2() { diff --git a/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java b/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java index 13049d8424..2bac2a4e00 100644 --- a/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java +++ b/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java @@ -66,7 +66,7 @@ public abstract class AbstractPasswordBasedSecurityRealm extends SecurityRealm { *

* If the user name and the password pair doesn't match, throw {@link AuthenticationException} to reject the login * attempt. - * @since TODO + * @since 2.266 */ protected UserDetails authenticate2(String username, String password) throws AuthenticationException { if (Util.isOverridden(AbstractPasswordBasedSecurityRealm.class, getClass(), "authenticate", String.class, String.class)) { diff --git a/core/src/main/java/hudson/security/AccessControlled.java b/core/src/main/java/hudson/security/AccessControlled.java index 694744996b..2de2ae904b 100644 --- a/core/src/main/java/hudson/security/AccessControlled.java +++ b/core/src/main/java/hudson/security/AccessControlled.java @@ -76,7 +76,7 @@ public interface AccessControlled { /** * Convenient short-cut for {@code getACL().hasPermission2(a, permission)} - * @since TODO + * @since 2.266 */ default boolean hasPermission2(@NonNull Authentication a, @NonNull Permission permission) { if (a.equals(ACL.SYSTEM2)) { diff --git a/core/src/main/java/hudson/security/AccessDeniedException3.java b/core/src/main/java/hudson/security/AccessDeniedException3.java index 64323bf5bc..a10f0f2355 100644 --- a/core/src/main/java/hudson/security/AccessDeniedException3.java +++ b/core/src/main/java/hudson/security/AccessDeniedException3.java @@ -10,7 +10,7 @@ import org.springframework.security.core.GrantedAuthority; /** * {@link AccessDeniedException} with more information. * @author Kohsuke Kawaguchi - * @since TODO + * @since 2.266 */ public class AccessDeniedException3 extends AccessDeniedException { diff --git a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java index 463e20f051..3c0ef459ef 100644 --- a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java +++ b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java @@ -642,7 +642,7 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea } /** - * @since TODO + * @since 2.266 */ public Collection getAuthorities2() { // TODO diff --git a/core/src/main/java/hudson/security/SecurityRealm.java b/core/src/main/java/hudson/security/SecurityRealm.java index 949f8cb6c2..fd1c9e730d 100644 --- a/core/src/main/java/hudson/security/SecurityRealm.java +++ b/core/src/main/java/hudson/security/SecurityRealm.java @@ -268,7 +268,7 @@ public abstract class SecurityRealm extends AbstractDescribableImplJENKINS-50669 - * @since TODO + * @since 2.259 */ public static int getDefaultRingBufferSize() { return DEFAULT_RING_BUFFER_SIZE; diff --git a/core/src/main/java/hudson/util/RunList.java b/core/src/main/java/hudson/util/RunList.java index 01e36c07ca..0204058ff7 100644 --- a/core/src/main/java/hudson/util/RunList.java +++ b/core/src/main/java/hudson/util/RunList.java @@ -205,7 +205,7 @@ public class RunList extends AbstractList { /** * Returns elements that satisfy the given predicate. * Warning: this method mutates the original list and then returns it. - * @since TODO + * @since 2.279 */ public RunList filter(Predicate predicate) { return filter(new PredicateAdapter(predicate)); diff --git a/core/src/main/java/jenkins/install/SetupWizard.java b/core/src/main/java/jenkins/install/SetupWizard.java index 58f42675ca..e8a8d4d074 100644 --- a/core/src/main/java/jenkins/install/SetupWizard.java +++ b/core/src/main/java/jenkins/install/SetupWizard.java @@ -124,7 +124,7 @@ public class SetupWizard extends PageDecorator { * * If you do not provide any value to that system property, the default admin account will not have an API Token. * - * @since TODO (for the existence of the sysprop, not the availability to plugin) + * @since 2.260 (with NoExternalUse) */ @Restricted(NoExternalUse.class) @SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "Accessible via System Groovy Scripts") diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java index 1f754f2c03..23d7e45069 100644 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -2809,7 +2809,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * Returns quiet down reason if it was indicated. * @return * Reason if it was indicated. null otherwise - * @since TODO + * @since 2.267 */ @Exported @CheckForNull @@ -3905,7 +3905,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * * @param block Block until the system really quiets down and no builds are running * @param timeout If non-zero, only block up to the specified number of milliseconds - * @deprecated since TODO; use {@link #doQuietDown(boolean, int, String)} instead. + * @deprecated since 2.267; use {@link #doQuietDown(boolean, int, String)} instead. */ @Deprecated public synchronized HttpRedirect doQuietDown(boolean block, int timeout) { @@ -3922,7 +3922,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * @param block Block until the system really quiets down and no builds are running * @param timeout If non-zero, only block up to the specified number of milliseconds * @param reason Quiet reason that will be visible to user - * @since TODO + * @since 2.267 */ @RequirePOST public HttpRedirect doQuietDown(@QueryParameter boolean block, @@ -4498,7 +4498,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve /** * Gets the {@link Authentication} object that represents the user * associated with the current request. - * @since TODO + * @since 2.266 */ public static @NonNull Authentication getAuthentication2() { Authentication a = SecurityContextHolder.getContext().getAuthentication(); @@ -5423,7 +5423,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * Because Spring Security creates its own {@link AnonymousAuthenticationToken} instances, the code must not * expect the singleton semantics. This is just a convenient instance. * - * @since TODO + * @since 2.266 */ public static final Authentication ANONYMOUS2 = new AnonymousAuthenticationToken("anonymous", "anonymous", Collections.singleton(new SimpleGrantedAuthority("anonymous"))); diff --git a/core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java b/core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java index 27c9e20884..471e0d3900 100644 --- a/core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java +++ b/core/src/main/java/jenkins/security/BasicHeaderAuthenticator.java @@ -35,7 +35,7 @@ public abstract class BasicHeaderAuthenticator implements ExtensionPoint { *

* When no processor can validate the username/password pair, caller will make * the request processing fail. - * @since TODO + * @since 2.266 */ @CheckForNull public Authentication authenticate2(HttpServletRequest req, HttpServletResponse rsp, String username, String password) throws IOException, ServletException { diff --git a/core/src/main/java/jenkins/security/ImpersonatingExecutorService.java b/core/src/main/java/jenkins/security/ImpersonatingExecutorService.java index 0fd9619f1d..daf2cc6b0f 100644 --- a/core/src/main/java/jenkins/security/ImpersonatingExecutorService.java +++ b/core/src/main/java/jenkins/security/ImpersonatingExecutorService.java @@ -44,7 +44,7 @@ public final class ImpersonatingExecutorService extends InterceptingExecutorServ * Creates a wrapper service. * @param base the base service * @param authentication for example {@link ACL#SYSTEM2} - * @since TODO + * @since 2.266 */ public ImpersonatingExecutorService(ExecutorService base, Authentication authentication) { super(base); diff --git a/core/src/main/java/jenkins/security/ImpersonatingScheduledExecutorService.java b/core/src/main/java/jenkins/security/ImpersonatingScheduledExecutorService.java index c278b52bb9..7888068695 100644 --- a/core/src/main/java/jenkins/security/ImpersonatingScheduledExecutorService.java +++ b/core/src/main/java/jenkins/security/ImpersonatingScheduledExecutorService.java @@ -43,7 +43,7 @@ public final class ImpersonatingScheduledExecutorService extends InterceptingSch * Creates a wrapper service. * @param base the base service * @param authentication for example {@link ACL#SYSTEM2} - * @since TODO + * @since 2.266 */ public ImpersonatingScheduledExecutorService(ScheduledExecutorService base, Authentication authentication) { super(base); diff --git a/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java b/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java index 5d298f39e4..3c6ed92566 100644 --- a/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java +++ b/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java @@ -50,7 +50,7 @@ public class LastGrantedAuthoritiesProperty extends UserProperty { } /** - * @since TODO + * @since 2.266 */ public Collection getAuthorities2() { String[] roles = this.roles; // capture to a variable for immutability diff --git a/core/src/main/java/jenkins/security/QueueItemAuthenticator.java b/core/src/main/java/jenkins/security/QueueItemAuthenticator.java index d45682152b..25f883b8ff 100644 --- a/core/src/main/java/jenkins/security/QueueItemAuthenticator.java +++ b/core/src/main/java/jenkins/security/QueueItemAuthenticator.java @@ -38,7 +38,7 @@ public abstract class QueueItemAuthenticator extends AbstractDescribableImpl run, @NonNull EnvVars env, @NonNull TaskListener listener) throws InterruptedException, IOException { // If this step requires a workspace, this is the wrong method to call. @@ -157,7 +157,7 @@ public interface SimpleBuildStep extends BuildStep { * applies. Otherwise, {@link #perform(Run, EnvVars, TaskListener)} applies. * * @return {@code true} if this step requires a workspace context; {@code false} otherwise. - * @since TODO + * @since 2.258 */ default boolean requiresWorkspace() { return true; diff --git a/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java b/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java index 656e38a117..c191059b78 100644 --- a/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java +++ b/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java @@ -73,7 +73,7 @@ public abstract class SimpleBuildWrapper extends BuildWrapper { * Otherwise, {@link #setUp(Context, Run, TaskListener, EnvVars)} applies. * * @return {@code true} if this wrapper requires a workspace context; {@code false} otherwise. - * @since TODO + * @since 2.258 */ public boolean requiresWorkspace() { return true; @@ -119,7 +119,7 @@ public abstract class SimpleBuildWrapper extends BuildWrapper { * @throws IllegalStateException if this wrapper requires a workspace context * @throws IOException if something fails; {@link AbortException} for user errors * @throws InterruptedException if setup is interrupted - * @since TODO + * @since 2.258 */ public void setUp(Context context, Run build, TaskListener listener, EnvVars initialEnvironment) throws IOException, InterruptedException { // If this wrapper requires a workspace, this is the wrong method to call. @@ -221,7 +221,7 @@ public abstract class SimpleBuildWrapper extends BuildWrapper { * Otherwise, {@link #tearDown(Run, TaskListener)} applies. * * @return {@code true} when this end-of-wrapped-block callback requires a workspace context; {@code false} otherwise. - * @since TODO + * @since 2.258 */ @Restricted(Beta.class) // to indicate it is to be called by Jenkins internals only; not part of the normal API public final boolean requiresWorkspace() { @@ -264,7 +264,7 @@ public abstract class SimpleBuildWrapper extends BuildWrapper { * @throws IllegalStateException if this end-of-wrapped-block callback requires a workspace * @throws IOException if something fails; {@link AbortException} for user errors * @throws InterruptedException if tear down is interrupted - * @since TODO + * @since 2.258 */ public void tearDown(Run build, TaskListener listener) throws IOException, InterruptedException { // If this callback requires a workspace, this is the wrong method to call. diff --git a/core/src/main/java/jenkins/util/VirtualFile.java b/core/src/main/java/jenkins/util/VirtualFile.java index 1a4a9a52dd..5a6e6bec4f 100644 --- a/core/src/main/java/jenkins/util/VirtualFile.java +++ b/core/src/main/java/jenkins/util/VirtualFile.java @@ -277,7 +277,7 @@ public abstract class VirtualFile implements Comparable, Serializab * @param noFollowLinks if true then do not follow links. * @return a list of {@code /}-separated relative names of children (files directly inside or in subdirectories) * @throws IOException if this is not a directory, or listing was not possible for some other reason - * @since TODO + * @since 2.275 and 2.263.2 */ @Restricted(NoExternalUse.class) public @NonNull Collection list(@NonNull String includes, @CheckForNull String excludes, boolean useDefaultExcludes, @@ -350,7 +350,7 @@ public abstract class VirtualFile implements Comparable, Serializab * If non-empty, a trailing slash will be enforced. * @return the number of files inside the archive (not the folders) * @throws IOException if this is not a directory, or listing was not possible for some other reason - * @since TODO + * @since 2.275 and 2.263.2 */ public int zip(OutputStream outputStream, String includes, String excludes, boolean useDefaultExcludes, boolean noFollowLinks, String prefix) throws IOException { diff --git a/core/src/main/java/jenkins/util/xml/XMLUtils.java b/core/src/main/java/jenkins/util/xml/XMLUtils.java index 63d5649297..55356e1221 100644 --- a/core/src/main/java/jenkins/util/xml/XMLUtils.java +++ b/core/src/main/java/jenkins/util/xml/XMLUtils.java @@ -108,7 +108,7 @@ public final class XMLUtils { * @return The XML {@link Document}. * @throws SAXException Error parsing the XML stream data e.g. badly formed XML. * @throws IOException Error reading from the steam. - * @since TODO + * @since 2.265 */ public static @NonNull Document parse(@NonNull InputStream stream) throws SAXException, IOException { DocumentBuilder docBuilder; @@ -153,7 +153,7 @@ public final class XMLUtils { * @return The parsed document. * @throws SAXException Error parsing the XML file data e.g. badly formed XML. * @throws IOException Error reading from the file. - * @since TODO + * @since 2.265 */ public static @NonNull Document parse(@NonNull File file) throws SAXException, IOException { if (!file.exists() || !file.isFile()) { diff --git a/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java b/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java index 30f3ab5dbf..9d6d5b6ff2 100644 --- a/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java +++ b/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java @@ -36,7 +36,7 @@ public class GrantedAuthoritySid implements Sid { } /** - * @since TODO + * @since 2.266 */ public GrantedAuthoritySid(GrantedAuthority ga) { grantedAuthority = ga.getAuthority(); diff --git a/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java b/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java index 9f620b1364..4853162595 100644 --- a/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java +++ b/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java @@ -37,7 +37,7 @@ public class PrincipalSid implements Sid { } /** - * @since TODO + * @since 2.266 */ public PrincipalSid(Authentication a) { Object p = a.getPrincipal();