未验证 提交 cc3d24c6 编写于 作者: M Mark Waite 提交者: GitHub

Merge pull request #4587 from daniel-beck/at-since-2020-03

Update at-since up to and including 2.226
......@@ -391,7 +391,7 @@ public class EnvVars extends TreeMap<String,String> {
/**
* Add entire map but filter null values out.
* @since TODO
* @since 2.214
*/
public void putAllNonNull(Map<String, String> map) {
map.forEach(this::putIfNotNull);
......
......@@ -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<Descriptor> getSortedDescriptorsForGlobalConfigByDescriptor(Predicate<Descriptor> predicate) {
ExtensionList<Descriptor> 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<Descriptor> 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) {
......
......@@ -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"),
......
......@@ -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 {
......
......@@ -839,7 +839,7 @@ public abstract class Descriptor<T extends Describable<T>> 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() {
......
......@@ -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)
......
......@@ -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) {
......
......@@ -62,7 +62,7 @@ public interface ItemGroup<T extends Item> 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<T> getItems(Predicate<T> pred) {
return getItemsStream(pred)
......@@ -71,7 +71,7 @@ public interface ItemGroup<T extends Item> extends PersistenceRoot, ModelObject
/**
* Gets a read-only stream of all the items in this collection
* @since TODO
* @since 2.221
*/
default Stream<T> getItemsStream() {
return getItems().stream();
......@@ -80,7 +80,7 @@ public interface ItemGroup<T extends Item> 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<T> getItemsStream(Predicate<T> pred) {
return getItemsStream().filter(pred);
......@@ -132,7 +132,7 @@ public interface ItemGroup<T extends Item> extends PersistenceRoot, ModelObject
/**
* Similar to {@link #getAllItems(Class)} with additional predicate filtering
* @since TODO
* @since 2.221
*/
default <T extends Item> List<T> getAllItems(Class<T> type, Predicate<T> pred) {
return Items.getAllItems(this, type, pred);
......@@ -150,7 +150,7 @@ public interface ItemGroup<T extends Item> 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 <T extends Item> Iterable<T> allItems(Class<T> type, Predicate<T> pred) {
return Items.allItems(this, type, pred);
......
......@@ -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 <T extends Item> List<T> getAllItems(final ItemGroup root, Class<T> type, Predicate<T> pred) {
List<T> r = new ArrayList<>();
......@@ -466,7 +466,7 @@ public class Items {
* @param <T> the type.
* @param <T> the predicate.
* @return An {@link Iterable} for all items.
* @since TODO
* @since 2.221
*/
public static <T extends Item> Iterable<T> allItems(ItemGroup root, Class<T> type, Predicate<T> pred) {
return allItems(Jenkins.getAuthentication(), root, type, pred);
......@@ -502,7 +502,7 @@ public class Items {
* @param <T> the type.
* @param pred the predicate.
* @return An {@link Iterable} for all items.
* @since TODO
* @since 2.221
*/
public static <T extends Item> Iterable<T> allItems(Authentication authentication, ItemGroup root, Class<T> type, Predicate<T> pred) {
return new AllItemsIterable<>(root, authentication, type, pred);
......
......@@ -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()),
......
......@@ -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<Run> feedAdapter) throws IOException, ServletException {
final FeedAdapter<Run> feedAdapter_ = feedAdapter == null ? Run.FEED_ADAPTER : feedAdapter;
......
......@@ -162,7 +162,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* This is applied to the raw, unformatted description. Especially complex formatting
* like hyperlinks can result in much less text being shown than this might imply.
* Negative values will disable truncation, {@code 0} will enforce empty strings.
* @since TODO
* @since 2.223
*/
private static /* non-final for Groovy */ int TRUNCATED_DESCRIPTION_LIMIT = SystemProperties.getInteger("historyWidget.descriptionLimit", 100);
......@@ -992,7 +992,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @return a list with the builds (youngest build first).
* May be smaller than 'numberOfBuilds' or even empty
* if not enough builds satisfying the threshold have been found. Never null.
* @since TODO
* @since 2.202
*/
protected @Nonnull List<RunT> getBuildsOverThreshold(int numberOfBuilds, @Nonnull Result threshold) {
List<RunT> builds = new ArrayList<>(numberOfBuilds);
......
......@@ -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<FormValidation> 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")
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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) {
......
......@@ -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 {
......
......@@ -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;
......
......@@ -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<TopLevelItem> getItems(Predicate<TopLevelItem> pred) {
List<TopLevelItem> viewableItems = new ArrayList<>();
......@@ -5310,7 +5310,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
* <p>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.</p>
*
* @since TODO
* @since 2.222
*/
@Restricted(Beta.class)
public static final Permission MANAGE = new Permission(PERMISSIONS, "Manage",
......
......@@ -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();
......
......@@ -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 {
......
......@@ -41,7 +41,7 @@ import org.kohsuke.stapler.Stapler;
/**
* Support for serving WebSocket responses.
* @since TODO
* @since 2.216
*/
@Restricted(Beta.class)
@Extension
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册