diff --git a/core/src/main/java/hudson/EnvVars.java b/core/src/main/java/hudson/EnvVars.java index e076b1e3701ed014f72d828d7cfa8af6706e47d9..c1e22c05238fc2ac478b2a8a95bd991fae64a90e 100644 --- a/core/src/main/java/hudson/EnvVars.java +++ b/core/src/main/java/hudson/EnvVars.java @@ -391,7 +391,7 @@ public class EnvVars extends TreeMap { /** * Add entire map but filter null values out. - * @since TODO + * @since 2.214 */ public void putAllNonNull(Map map) { map.forEach(this::putIfNotNull); diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index c1dcb27f0603536f80de6a95f534b12992695cc5..353997c69f85e0bad5892b41383a5cfd4ea7ec23 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -526,7 +526,7 @@ public class Functions { /** * Returns true if and only if the UI refresh is enabled. * - * @since TODO + * @since 2.222 */ @Restricted(DoNotUse.class) public static boolean isUiRefreshEnabled() { @@ -1099,7 +1099,7 @@ public class Functions { * * @param predicate * Filter the descriptors based on this predicate - * @since TODO + * @since 2.222 */ public static Collection getSortedDescriptorsForGlobalConfigByDescriptor(Predicate predicate) { ExtensionList exts = ExtensionList.lookup(Descriptor.class); @@ -1148,7 +1148,7 @@ public class Functions { /** * Descriptors shown in the global configuration form to users with {@link Jenkins#SYSTEM_READ} permission. * - * @since TODO + * @since 2.222 */ @Restricted(NoExternalUse.class) public static Collection getSortedDescriptorsForGlobalConfigUnclassifiedReadable() { @@ -1162,7 +1162,7 @@ public class Functions { * @throws AccessDeniedException * if the user doesn't have the permission. * - * @since TODO + * @since 2.222 */ public static void checkAnyPermission(AccessControlled ac, Permission[] permissions) { if (permissions == null || permissions.length == 0) { diff --git a/core/src/main/java/hudson/init/InitMilestone.java b/core/src/main/java/hudson/init/InitMilestone.java index 02fa2b6c23c7b0dba9bd92a9224617086d40f4af..2653857f4df47b27db7b4e7b678cafd53b8dacd8 100644 --- a/core/src/main/java/hudson/init/InitMilestone.java +++ b/core/src/main/java/hudson/init/InitMilestone.java @@ -89,14 +89,14 @@ public enum InitMilestone implements Milestone { /** * By this milestone, all the system configurations are loaded from file system - * @since TODO + * @since 2.220 */ SYSTEM_CONFIG_LOADED("System config loaded"), /** * By this milestone, the system configuration is adapted just in case any plugin (CasC might be an example) needs * to update configuration files - * @since TODO + * @since 2.220 */ SYSTEM_CONFIG_ADAPTED("System config adapted"), @@ -107,7 +107,7 @@ public enum InitMilestone implements Milestone { /** * By this milestone, any job configuration is adapted or updated just in case any plugin needs to update former/old configurations or init scripts - * @since TODO + * @since 2.220 */ JOB_CONFIG_ADAPTED("Configuration for all jobs updated"), diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 0fe348bedae87435b6447ee788feb121dcfe15ae..b474701a154b2de0ff863b1d771195ca6530343b 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1383,7 +1383,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * Retrieve the RSS feed for the last build for each project executed in this computer. * Only the information from {@link AbstractProject} is displayed since there isn't a proper API to gather * information about the node where the builds are executed for other sorts of projects such as Pipeline - * @since TODO + * @since 2.215 */ @Restricted(DoNotUse.class) public void doRssLatest( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { diff --git a/core/src/main/java/hudson/model/Descriptor.java b/core/src/main/java/hudson/model/Descriptor.java index a946de2acfdb79c6cc7ca64054998aa64178945a..431f9f2bf2071cce7664d834b2f845fe6aba49c6 100644 --- a/core/src/main/java/hudson/model/Descriptor.java +++ b/core/src/main/java/hudson/model/Descriptor.java @@ -839,7 +839,7 @@ public abstract class Descriptor> implements Saveable, * Override to return something different if appropriate. The only currently supported alternative return value is {@link Jenkins#MANAGE}. * * @return Permission required to globally configure this descriptor. - * @since TODO + * @since 2.222 */ public @Nonnull Permission getRequiredGlobalConfigPagePermission() { diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index e69fa2100b51543d57a1d9c880342f90fe5b2fc3..e168724088ce5b33d8cdf027d60fbefa54b87c8a 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -857,7 +857,7 @@ public class Executor extends Thread implements ModelObject { * @param runExtId * if not null, the externalizable id ({@link Run#getExternalizableId()}) * of the build the user expects to interrupt - * @since TODO + * @since 2.209 */ @RequirePOST @Restricted(NoExternalUse.class) diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index 0c2c61ecb3aff6738102f9d3d39528ee03782d21..af0e556c9ae64c12a8e603a70fc5260b96f12eae 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -1307,7 +1307,7 @@ public class Fingerprint implements ModelObject, Saveable { /** * Returns a facet that blocks the deletion of the fingerprint. * Returns null if no such facet. - * @since TODO + * @since 2.223 */ public @CheckForNull FingerprintFacet getFacetBlockingDeletion() { for (FingerprintFacet facet : facets) { diff --git a/core/src/main/java/hudson/model/ItemGroup.java b/core/src/main/java/hudson/model/ItemGroup.java index f79df6bae4e89055aa6cb5cb4a478807da58a859..0bd366a968eaf6f18d48f2c75fda808cd2e0215f 100644 --- a/core/src/main/java/hudson/model/ItemGroup.java +++ b/core/src/main/java/hudson/model/ItemGroup.java @@ -62,7 +62,7 @@ public interface ItemGroup extends PersistenceRoot, ModelObject /** * Gets all the items in this collection in a read-only view * that matches supplied Predicate - * @since TODO + * @since 2.221 */ default Collection getItems(Predicate pred) { return getItemsStream(pred) @@ -71,7 +71,7 @@ public interface ItemGroup extends PersistenceRoot, ModelObject /** * Gets a read-only stream of all the items in this collection - * @since TODO + * @since 2.221 */ default Stream getItemsStream() { return getItems().stream(); @@ -80,7 +80,7 @@ public interface ItemGroup extends PersistenceRoot, ModelObject /** * Gets a read-only stream of all the items in this collection * that matches supplied Predicate - * @since TODO + * @since 2.221 */ default Stream getItemsStream(Predicate pred) { return getItemsStream().filter(pred); @@ -132,7 +132,7 @@ public interface ItemGroup extends PersistenceRoot, ModelObject /** * Similar to {@link #getAllItems(Class)} with additional predicate filtering - * @since TODO + * @since 2.221 */ default List getAllItems(Class type, Predicate pred) { return Items.getAllItems(this, type, pred); @@ -150,7 +150,7 @@ public interface ItemGroup extends PersistenceRoot, ModelObject /** * Gets all the {@link Item}s unordered, lazily and recursively in the {@link ItemGroup} tree * and filter them by the given type and given predicate - * @since TODO + * @since 2.221 */ default Iterable allItems(Class type, Predicate pred) { return Items.allItems(this, type, pred); diff --git a/core/src/main/java/hudson/model/Items.java b/core/src/main/java/hudson/model/Items.java index df4af2e2210b9b1069de7f3bf3820196b329bc78..4d1fbd374dbcc75296f71bd2dba364802c9e14ba 100644 --- a/core/src/main/java/hudson/model/Items.java +++ b/core/src/main/java/hudson/model/Items.java @@ -413,7 +413,7 @@ public class Items { * @param pred Predicate condition to filter items * @return List of items matching given criteria * - * @since TODO + * @since 2.221 */ public static List getAllItems(final ItemGroup root, Class type, Predicate pred) { List r = new ArrayList<>(); @@ -466,7 +466,7 @@ public class Items { * @param the type. * @param the predicate. * @return An {@link Iterable} for all items. - * @since TODO + * @since 2.221 */ public static Iterable allItems(ItemGroup root, Class type, Predicate pred) { return allItems(Jenkins.getAuthentication(), root, type, pred); @@ -502,7 +502,7 @@ public class Items { * @param the type. * @param pred the predicate. * @return An {@link Iterable} for all items. - * @since TODO + * @since 2.221 */ public static Iterable allItems(Authentication authentication, ItemGroup root, Class type, Predicate pred) { return new AllItemsIterable<>(root, authentication, type, pred); diff --git a/core/src/main/java/hudson/model/ManagementLink.java b/core/src/main/java/hudson/model/ManagementLink.java index 1c5849b26757512c3cc286582b5ece458725c4db..8ac993429ee4e4940fef3222a84ec629d735297f 100644 --- a/core/src/main/java/hudson/model/ManagementLink.java +++ b/core/src/main/java/hudson/model/ManagementLink.java @@ -143,7 +143,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action { * when this was introduced can define a category. Plugins with newer core dependency override {@link #getCategory()} instead. * * @return name of the desired category, one of the enum values of {@link Category}, e.g. {@code STATUS}. - * @since TODO + * @since 2.226 */ @Restricted(NoExternalUse.class) // TODO I don't think this works protected @Nonnull String getCategoryName() { @@ -154,7 +154,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action { * Category for management link, uses {@code String} so it can be done with core dependency pre-dating the version this feature was added. * * @return An enum value of {@link Category}. - * @since TODO + * @since 2.226 */ public @Nonnull Category getCategory() { try { @@ -168,7 +168,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action { /** * Categories supported by this version of core. * - * @since TODO + * @since 2.226 */ public enum Category { CONFIGURATION(Messages._ManagementLink_Category_CONFIGURATION()), diff --git a/core/src/main/java/hudson/model/RSS.java b/core/src/main/java/hudson/model/RSS.java index ab9177ccc8a2e34048ae0a7d839502cb31fd6c6c..b68606971f6c6bad2b21e2452ae7b4a9ff20ff72 100644 --- a/core/src/main/java/hudson/model/RSS.java +++ b/core/src/main/java/hudson/model/RSS.java @@ -81,7 +81,7 @@ public final class RSS { * URL of the model object that owns this feed. Relative to the context root. * @param runList * Entries to be listed in the RSS feed. - * @since TODO + * @since 2.215 */ public static void rss(StaplerRequest req, StaplerResponse rsp, String title, String url, RunList runList) throws IOException, ServletException { rss(req, rsp, title, url, runList, null); @@ -98,7 +98,7 @@ public final class RSS { * Entries to be listed in the RSS feed. * @param feedAdapter * Controls how to render entries to RSS. - * @since TODO + * @since 2.215 */ public static void rss(StaplerRequest req, StaplerResponse rsp, String title, String url, RunList runList, FeedAdapter feedAdapter) throws IOException, ServletException { final FeedAdapter feedAdapter_ = feedAdapter == null ? Run.FEED_ADAPTER : feedAdapter; diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 12d48146978f2bf10f646c7202ab6152d2695420..8d32b1ebafb7c338c15cc00c8f7019b395750da1 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -162,7 +162,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run getBuildsOverThreshold(int numberOfBuilds, @Nonnull Result threshold) { List builds = new ArrayList<>(numberOfBuilds); diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 58a3c2f2bc6d1d28a7716fe11a7be1632288c099..46e5033aae8c180484677bd77189574f2968f43b 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -168,7 +168,7 @@ public class UpdateSite { * does not exist, or is otherwise due for update. * Accepted formats are JSONP or HTML with {@code postMessage}, not raw JSON. * @return null if no updates are necessary, or the future result - * @since TODO + * @since 2.222 */ public @CheckForNull Future updateDirectly() { return updateDirectly(DownloadService.signatureCheck); @@ -199,7 +199,7 @@ public class UpdateSite { /** * Forces an update of the data file from the configured URL, irrespective of the last time the data was retrieved. * @return A {@code FormValidation} indicating the if the update metadata was successfully downloaded from the configured update site - * @since TODO + * @since 2.222 * @throws IOException if there was an error downloading or saving the file. */ public @Nonnull FormValidation updateDirectlyNow() throws IOException { @@ -1023,7 +1023,7 @@ public class UpdateSite { /** * Date when this plugin was released. - * @since TODO + * @since 2.224 */ @Exported public final Date releaseTimestamp; @@ -1325,7 +1325,7 @@ public class UpdateSite { /** * Get the list of incompatible dependencies (if there are any, as determined by isNeededDependenciesCompatibleWithInstalledVersion) * - * @since TODO + * @since 2.203 */ @Restricted(NoExternalUse.class) // table.jelly @SuppressWarnings("unchecked") diff --git a/core/src/main/java/hudson/security/ACL.java b/core/src/main/java/hudson/security/ACL.java index 6074e3806403c21283106c216240e9df6fa67d82..120378c76454e891144a6b5a62abea3a0ad0bee7 100644 --- a/core/src/main/java/hudson/security/ACL.java +++ b/core/src/main/java/hudson/security/ACL.java @@ -89,7 +89,7 @@ public abstract class ACL { * @throws IllegalArgumentException * if no permissions are provided * - * @since TODO + * @since 2.222 */ public final void checkAnyPermission(@Nonnull Permission... permissions) { if (permissions.length == 0) { diff --git a/core/src/main/java/hudson/security/AccessControlled.java b/core/src/main/java/hudson/security/AccessControlled.java index d16494563a9c875623cb55e9bced73c14f0ea20d..9ea9272300ed4b0b453497bde0b5c416d61cff08 100644 --- a/core/src/main/java/hudson/security/AccessControlled.java +++ b/core/src/main/java/hudson/security/AccessControlled.java @@ -51,7 +51,7 @@ public interface AccessControlled { * Convenient short-cut for {@code getACL().checkAnyPermission(permission)} * @see ACL#checkAnyPermission(Permission...) * - * @since TODO + * @since 2.222 */ default void checkAnyPermission(@Nonnull Permission... permission) throws AccessDeniedException { getACL().checkAnyPermission(permission); @@ -68,7 +68,7 @@ public interface AccessControlled { * Convenient short-cut for {@code getACL().hasAnyPermission(permission)} * @see ACL#hasAnyPermission(Permission...) * - * @since TODO + * @since 2.222 */ default boolean hasAnyPermission(@Nonnull Permission... permission) { return getACL().hasAnyPermission(permission); diff --git a/core/src/main/java/hudson/slaves/JNLPLauncher.java b/core/src/main/java/hudson/slaves/JNLPLauncher.java index db006ce8bd7506ae7d1cef32dfd2b36db0261292..ae8dab48f50e7747183a70e38a5e13572c85f3ad 100644 --- a/core/src/main/java/hudson/slaves/JNLPLauncher.java +++ b/core/src/main/java/hudson/slaves/JNLPLauncher.java @@ -148,14 +148,14 @@ public class JNLPLauncher extends ComputerLauncher { } /** - * @since TODO + * @since 2.216 */ public boolean isWebSocket() { return webSocket; } /** - * @since TODO + * @since 2.216 */ @DataBoundSetter public void setWebSocket(boolean webSocket) { diff --git a/core/src/main/java/hudson/triggers/SafeTimerTask.java b/core/src/main/java/hudson/triggers/SafeTimerTask.java index 73409e4ae444fe5ee5f28a31bed505af613bbcad..bda2fe1657fefc108e776a092a1f98df401f5990 100644 --- a/core/src/main/java/hudson/triggers/SafeTimerTask.java +++ b/core/src/main/java/hudson/triggers/SafeTimerTask.java @@ -52,7 +52,7 @@ public abstract class SafeTimerTask extends TimerTask { /** * Lambda-friendly means of creating a task. - * @since TODO + * @since 2.216 */ public static SafeTimerTask of(ExceptionRunnable r) { return new SafeTimerTask() { @@ -64,7 +64,7 @@ public abstract class SafeTimerTask extends TimerTask { } /** * @see #of - * @since TODO + * @since 2.216 */ @FunctionalInterface public interface ExceptionRunnable { diff --git a/core/src/main/java/jenkins/model/FingerprintFacet.java b/core/src/main/java/jenkins/model/FingerprintFacet.java index a5f828c6851d5abb13910fea5fe70f27cfa5d109..cf8d2a540d62fe38564a49268264f034e61b039a 100644 --- a/core/src/main/java/jenkins/model/FingerprintFacet.java +++ b/core/src/main/java/jenkins/model/FingerprintFacet.java @@ -106,7 +106,7 @@ public abstract class FingerprintFacet implements ExtensionPoint { /** * Returns whether Fingerprint deletion has been blocked by this Facet. * Returns false by default. Override the default to block the deletion of the associated Fingerprint. - * @since TODO + * @since 2.223 */ public boolean isFingerprintDeletionBlocked() { return false; diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java index 1a3b7217e2c765280e6ebf4033011b106e206b0b..2055dc1ec8a3560bf2c4717dc80b6e102721c625 100644 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -1061,7 +1061,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * Retrieve the proxy configuration. * * @return the proxy configuration - * @since TODO + * @since 2.205 */ @CheckForNull public ProxyConfiguration getProxy() { @@ -1072,7 +1072,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * Set the proxy configuration. * * @param proxy the proxy to set - * @since TODO + * @since 2.205 */ public void setProxy(@CheckForNull ProxyConfiguration proxy) { this.proxy = proxy; @@ -1376,7 +1376,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve /** * If usage statistics has been disabled * - * @since TODO + * @since 2.226 */ @CheckForNull public Boolean isNoUsageStatistics() { @@ -1388,7 +1388,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * * @return {@code true} if usage statistics should be collected. * Defaults to {@code true} when {@link #noUsageStatistics} is not set. - * @since TODO + * @since 2.226 */ public boolean isUsageStatisticsCollected() { return noUsageStatistics==null || !noUsageStatistics; @@ -1397,7 +1397,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve /** * Sets the noUsageStatistics flag * - * @since TODO + * @since 2.226 */ public void setNoUsageStatistics(Boolean noUsageStatistics) throws IOException { this.noUsageStatistics = noUsageStatistics; @@ -1794,7 +1794,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve * Gets just the immediate children of {@link Jenkins} based on supplied predicate. * * @see #getAllItems(Class) - * @since TODO + * @since 2.221 */ public List getItems(Predicate pred) { List viewableItems = new ArrayList<>(); @@ -5310,7 +5310,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve *

This permission is disabled by default and support for it considered experimental. * Administrators can set the system property {@code jenkins.security.ManagePermission} to enable it.

* - * @since TODO + * @since 2.222 */ @Restricted(Beta.class) public static final Permission MANAGE = new Permission(PERMISSIONS, "Manage", diff --git a/core/src/main/java/jenkins/telemetry/Telemetry.java b/core/src/main/java/jenkins/telemetry/Telemetry.java index 6e4538aa47c4ff0174cedacd675f1d01bb4b1be6..3de00bc4b82cce7ee29d3434d3491cac88e41f52 100644 --- a/core/src/main/java/jenkins/telemetry/Telemetry.java +++ b/core/src/main/java/jenkins/telemetry/Telemetry.java @@ -145,7 +145,7 @@ public abstract class Telemetry implements ExtensionPoint { * Returns true iff we're in the time period during which this is supposed to collect data. * @return true iff we're in the time period during which this is supposed to collect data * - * @since TODO + * @since 2.202 */ public boolean isActivePeriod() { LocalDate now = LocalDate.now(); diff --git a/core/src/main/java/jenkins/websocket/WebSocketSession.java b/core/src/main/java/jenkins/websocket/WebSocketSession.java index 95a7ed76094ccd9508e474ed7b60ddbbdde36808..7330bd6cefd4282ba4dcd3f1471ddcf00a44764f 100644 --- a/core/src/main/java/jenkins/websocket/WebSocketSession.java +++ b/core/src/main/java/jenkins/websocket/WebSocketSession.java @@ -39,7 +39,7 @@ import org.kohsuke.accmod.restrictions.Beta; /** * One WebSocket connection. * @see WebSockets - * @since TODO + * @since 2.216 */ @Restricted(Beta.class) public abstract class WebSocketSession { diff --git a/core/src/main/java/jenkins/websocket/WebSockets.java b/core/src/main/java/jenkins/websocket/WebSockets.java index 2d856d5069cb1250dcf781c7f42d6bf5ed0cbe0e..5410fba7bb233135ffb06330efe485a5796fc2e1 100644 --- a/core/src/main/java/jenkins/websocket/WebSockets.java +++ b/core/src/main/java/jenkins/websocket/WebSockets.java @@ -41,7 +41,7 @@ import org.kohsuke.stapler.Stapler; /** * Support for serving WebSocket responses. - * @since TODO + * @since 2.216 */ @Restricted(Beta.class) @Extension diff --git a/update-since-todo.sh b/update-since-todo.sh index 17192ac638384e55c65a69b6c6bb2eef3e2c655d..e273242e5b849a81880dc3841cfa090b728307af 100755 --- a/update-since-todo.sh +++ b/update-since-todo.sh @@ -3,7 +3,9 @@ # This script is a developer tool, to be used by maintainers # to update '@since TODO' entries with actual Jenkins release versions. -set -euo pipefail +set -o errexit +set -o nounset +set -o pipefail me="$( basename "$0" )" @@ -19,7 +21,7 @@ do lineSha=$( git blame --porcelain -L "$line,$line" "$file" | head -1 | cut -d ' ' -f 1 ) echo -e "\tfirst sha: $lineSha" - firstTag=$( git tag --sort=creatordate --contains "$lineSha" | head -1 ) + firstTag=$( git tag --sort=creatordate --contains "$lineSha" 'jenkins-*' | head -1 ) if [[ -n $firstTag ]]; then echo -e "\tfirst tag was $firstTag" @@ -28,6 +30,6 @@ do sed -i.bak "$sedExpr" "$file" rm -f "$file.bak" else - echo -e "\tNot updating file, no tag found. Normal if the associated PR/commit is not merged and released yet" + echo -e "\tNot updating file, no tag found. Normal if the associated PR/commit is not merged and released yet; otherwise make sure to fetch tags from jenkinsci/jenkins" fi done