diff --git a/core/src/main/java/hudson/EnvVars.java b/core/src/main/java/hudson/EnvVars.java index e076b1e3701e..c1e22c05238f 100644 --- a/core/src/main/java/hudson/EnvVars.java +++ b/core/src/main/java/hudson/EnvVars.java @@ -391,7 +391,7 @@ public void putIfNotNull(String key, String value) { /** * 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 c1dcb27f0603..353997c69f85 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -526,7 +526,7 @@ public static String getSystemProperty(String key) { /** * 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 static Collection getSortedDescriptorsForGlobalConfig(com.goo * * @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 static Collection getSortedDescriptorsForGlobalConfigUnclassi /** * 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 static Collection getSortedDescriptorsForGlobalConfigUnclassi * @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 02fa2b6c23c7..2653857f4df4 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 0fe348bedae8..b474701a154b 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1383,7 +1383,7 @@ public void doRssFailed(StaplerRequest req, StaplerResponse rsp ) throws IOExcep * 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 a946de2acfdb..431f9f2bf207 100644 --- a/core/src/main/java/hudson/model/Descriptor.java +++ b/core/src/main/java/hudson/model/Descriptor.java @@ -839,7 +839,7 @@ public String getGlobalConfigPage() { * 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 e69fa2100b51..e168724088ce 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -857,7 +857,7 @@ public HttpResponse doStop() { * @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 0c2c61ecb3af..af0e556c9ae6 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -1307,7 +1307,7 @@ void save(File file) throws IOException { /** * 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 f79df6bae4e8..0bd366a968ea 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 @@ default Collection getItems(Predicate pred) { /** * 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 @@ default Stream getItemsStream() { /** * 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 @@ default List getAllItems(Class type) { /** * 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 @@ default Iterable allItems(Class type) { /** * 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 df4af2e2210b..4d1fbd374dbc 100644 --- a/core/src/main/java/hudson/model/Items.java +++ b/core/src/main/java/hudson/model/Items.java @@ -413,7 +413,7 @@ public static List getAllItems(final ItemGroup root, Class List getAllItems(final ItemGroup root, Class type, Predicate pred) { List r = new ArrayList<>(); @@ -466,7 +466,7 @@ public static Iterable allItems(ItemGroup root, Class typ * @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 static Iterable allItems(Authentication authenticatio * @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 1c5849b26757..8ac993429ee4 100644 --- a/core/src/main/java/hudson/model/ManagementLink.java +++ b/core/src/main/java/hudson/model/ManagementLink.java @@ -143,7 +143,7 @@ public boolean getRequiresPOST() { * 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 boolean getRequiresPOST() { * 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 boolean getRequiresPOST() { /** * 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 ab9177ccc8a2..b68606971f6c 100644 --- a/core/src/main/java/hudson/model/RSS.java +++ b/core/src/main/java/hudson/model/RSS.java @@ -81,7 +81,7 @@ public static void forwardToRss(String title, String url, Collection 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 12d48146978f..8d32b1ebafb7 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 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 58a3c2f2bc6d..46e5033aae8c 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -168,7 +168,7 @@ public long getDataTimestamp() { * 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 long getDataTimestamp() { /** * 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 final class Plugin extends Entry { /** * Date when this plugin was released. - * @since TODO + * @since 2.224 */ @Exported public final Date releaseTimestamp; @@ -1325,7 +1325,7 @@ public boolean fixesSecurityVulnerabilities() { /** * 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 6074e3806403..120378c76454 100644 --- a/core/src/main/java/hudson/security/ACL.java +++ b/core/src/main/java/hudson/security/ACL.java @@ -89,7 +89,7 @@ public final void checkPermission(@Nonnull Permission p) { * @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 d16494563a9c..9ea9272300ed 100644 --- a/core/src/main/java/hudson/security/AccessControlled.java +++ b/core/src/main/java/hudson/security/AccessControlled.java @@ -51,7 +51,7 @@ default void checkPermission(@Nonnull Permission permission) throws AccessDenied * 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 @@ default boolean hasPermission(@Nonnull Permission permission) { * 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 db006ce8bd75..ae8dab48f50e 100644 --- a/core/src/main/java/hudson/slaves/JNLPLauncher.java +++ b/core/src/main/java/hudson/slaves/JNLPLauncher.java @@ -148,14 +148,14 @@ public boolean isLaunchSupported() { } /** - * @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 73409e4ae444..bda2fe1657fe 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 @@ protected void doRun() throws Exception { } /** * @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 a5f828c6851d..cf8d2a540d62 100644 --- a/core/src/main/java/jenkins/model/FingerprintFacet.java +++ b/core/src/main/java/jenkins/model/FingerprintFacet.java @@ -106,7 +106,7 @@ public long getTimestamp() { /** * 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 1a3b7217e2c7..2055dc1ec8a3 100644 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -1061,7 +1061,7 @@ private Object readResolve() { * Retrieve the proxy configuration. * * @return the proxy configuration - * @since TODO + * @since 2.205 */ @CheckForNull public ProxyConfiguration getProxy() { @@ -1072,7 +1072,7 @@ public ProxyConfiguration getProxy() { * 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 UpdateCenter getUpdateCenter() { /** * If usage statistics has been disabled * - * @since TODO + * @since 2.226 */ @CheckForNull public Boolean isNoUsageStatistics() { @@ -1388,7 +1388,7 @@ public Boolean isNoUsageStatistics() { * * @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 boolean isUsageStatisticsCollected() { /** * Sets the noUsageStatistics flag * - * @since TODO + * @since 2.226 */ public void setNoUsageStatistics(Boolean noUsageStatistics) throws IOException { this.noUsageStatistics = noUsageStatistics; @@ -1794,7 +1794,7 @@ public List getItems() { * 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 boolean shouldShowStackTrace() { *

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 6e4538aa47c4..3de00bc4b82c 100644 --- a/core/src/main/java/jenkins/telemetry/Telemetry.java +++ b/core/src/main/java/jenkins/telemetry/Telemetry.java @@ -145,7 +145,7 @@ public static boolean isDisabled() { * 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 95a7ed76094c..7330bd6cefd4 100644 --- a/core/src/main/java/jenkins/websocket/WebSocketSession.java +++ b/core/src/main/java/jenkins/websocket/WebSocketSession.java @@ -39,7 +39,7 @@ /** * 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 2d856d5069cb..5410fba7bb23 100644 --- a/core/src/main/java/jenkins/websocket/WebSockets.java +++ b/core/src/main/java/jenkins/websocket/WebSockets.java @@ -41,7 +41,7 @@ /** * 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 17192ac63838..e273242e5b84 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