Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/FilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ public int copyRecursiveTo(final DirScanner scanner, final FilePath target, fina
* @param description a description of the fileset, for logging purposes
* @param compression compression to use
* @return the number of files copied
* @since TODO
* @since 2.196

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public int copyRecursiveTo(final DirScanner scanner, final FilePath target, final String description, @Nonnull TarCompression compression) throws IOException, InterruptedException {
if(this.channel==target.channel) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ public static String encode(String s) {
* Shortcut function for calling {@link URLEncoder#encode(String,String)} (with UTF-8 encoding).<br>
* Useful for encoding URL query parameters in jelly code (as in {@code "...?param=${h.urlEncode(something)}"}).
*
* @since TODO
* @since 2.200

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public static String urlEncode(String s) {
try {
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/hudson/PluginWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public void setOptionalDependants(@Nonnull Set<String> optionalDependents) {

/**
* Like {@link #getDependents} but excluding optional dependencies.
* @since TODO
* @since 2.181

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public @Nonnull Set<String> getMandatoryDependents() {
Set<String> s = new HashSet<>(dependents);
Expand Down Expand Up @@ -312,7 +312,7 @@ public boolean hasDependents() {

/**
* Like {@link #hasDependents} but excluding optional dependencies.
* @since TODO
* @since 2.181

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public boolean hasMandatoryDependents() {
if (isBundled) {
Expand Down Expand Up @@ -357,7 +357,7 @@ public boolean hasDependencies() {

/**
* Like {@link #hasDependencies} but omitting optional dependencies.
* @since TODO
* @since 2.181

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public boolean hasMandatoryDependencies() {
return dependencies.stream().anyMatch(d -> !d.optional);
Expand Down Expand Up @@ -486,7 +486,7 @@ public List<Dependency> getDependencies() {

/**
* Like {@link #getDependencies} but omits optional dependencies.
* @since TODO
* @since 2.181

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public List<Dependency> getMandatoryDependencies() {
return dependencies.stream().filter(d -> !d.optional).collect(Collectors.toList());
Expand Down Expand Up @@ -600,7 +600,7 @@ private String getVersionOf(Manifest manifest) {
*
* @see <a href="https://github.com/jenkinsci/maven-hpi-plugin/pull/75">maven-hpi-plugin#PR-75</a>.
*
* @since TODO
* @since 2.158

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Exported
public @CheckForNull String getMinimumJavaVersion() {
Expand Down Expand Up @@ -1002,7 +1002,7 @@ public boolean isDeleted() {

/**
* Same as {@link DetachedPluginsUtil#isDetachedPlugin}.
* @since TODO
* @since 2.185

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Exported
public boolean isDetached() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/TcpSlaveAgentListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public int getAdvertisedPort() {

/**
* Gets the host name that we advertise protocol clients to connect to.
* @since TODO
* @since 2.198

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public String getAdvertisedHost() {
if (CLI_HOST_NAME != null) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/UpdateCenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ public abstract class DownloadJob extends UpdateCenterJob implements WithCompute

/**
* Display name used for the GUI.
* @since TODO
* @since 2.189

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public String getDisplayName() {
return getName();
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/java/hudson/model/UpdateSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ public final class Plugin extends Entry {
/**
* Version of Java this plugin requires to run.
*
* @since TODO
* @since 2.158

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Exported
public final String minimumJavaVersion;
Expand Down Expand Up @@ -1035,7 +1035,7 @@ public PluginWrapper getInstalled() {
* Returns true if the plugin and its dependencies are fully compatible with the current installation
* This is set to restricted for now, since it is only being used by Jenkins UI at the moment.
*
* @since TODO
* @since 2.175

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Restricted(NoExternalUse.class)
public boolean isCompatible() {
Expand Down Expand Up @@ -1132,7 +1132,7 @@ public boolean isForNewerHudson() {

/**
* Returns true iff the plugin declares a minimum Java version and it's newer than what the Jenkins master is running on.
* @since TODO
* @since 2.158

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public boolean isForNewerJava() {
try {
Expand Down Expand Up @@ -1161,7 +1161,7 @@ public VersionNumber getNeededDependenciesRequiredCore() {

/**
* Returns the minimum Java version needed to use the plugin and all its dependencies.
* @since TODO
* @since 2.158

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @return the minimum Java version needed to use the plugin and all its dependencies, or null if unspecified.
*/
@CheckForNull
Expand Down Expand Up @@ -1208,7 +1208,7 @@ public boolean isNeededDependenciesForNewerJenkins(PluginManager.MetadataCache c
/**
* Returns true iff any of the plugin dependencies require a newer Java than Jenkins is running on.
*
* @since TODO
* @since 2.158

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public boolean isNeededDependenciesForNewerJava() {
for (Plugin p: getNeededDependencies()) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/View.java
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ void addDisplayNamesToSearchIndex(SearchIndexBuilder sib, Collection<TopLevelIte
* Add a simple CollectionSearchIndex object to sib
*
* @param sib the SearchIndexBuilder
* @since TODO
* @since 2.200
*/
protected void makeSearchIndex(SearchIndexBuilder sib) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sib.add(new CollectionSearchIndex<TopLevelItem>() {// for jobs in the view
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/ViewGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public interface ViewGroup extends Saveable, ModelObject, AccessControlled {
* @return
* can be empty but never null.
*
* @since TODO
* @since 2.174

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Nonnull
default Collection<View> getAllViews() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/os/WindowsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* Adapted from:
* https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
*
* @since TODO
* @since 2.183

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public class WindowsUtil {
private static final Pattern NEEDS_QUOTING = Pattern.compile("[\\s\"]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class JenkinsLocationConfiguration extends GlobalConfiguration implements
* If disabled, the application will no longer check for URL validity in the configuration page.
* This will lead to an instance vulnerable to SECURITY-1471.
*
* @since TODO
* @since 2.176.4 / 2.197

@daniel-beck daniel-beck Oct 13, 2019

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Restricted(NoExternalUse.class)
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "Accessible via System Groovy Scripts")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* <p>
* This code was originally moved from {@link ClassicPluginStrategy}.
*
* @since TODO
* @since 2.163

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Restricted(NoExternalUse.class)
public class DetachedPluginsUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @see ResourceDomainFilter
* @see ResourceDomainRootAction
*
* @since TODO
* @since 2.200

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Extension(ordinal = JenkinsLocationConfiguration.ORDINAL-1) // sort just below the regular location config
@Restricted(NoExternalUse.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* Prohibit requests to Jenkins coming through a resource domain URL configured with
* {@link ResourceDomainConfiguration}, except anything going to {@link ResourceDomainRootAction}.
*
* @since TODO
* @since 2.200

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Restricted(NoExternalUse.class)
public class ResourceDomainFilter implements Filter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*
* @see ResourceDomainConfiguration
*
* @since TODO
* @since 2.200

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Extension
@Restricted(NoExternalUse.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* @see ResourceDomainConfiguration
* @see ResourceDomainFilter
*
* @since TODO
* @since 2.200

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Extension
@Restricted(NoExternalUse.class)
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/jenkins/security/SecurityListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected void failedToAuthenticate(@Nonnull String username){}
protected void loggedIn(@Nonnull String username){}

/**
* @since TODO
* @since 2.161

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*
* Fired after a new user account has been created and saved to disk.
*
Expand Down Expand Up @@ -106,7 +106,7 @@ public static void fireAuthenticated(@Nonnull UserDetails details) {
}
}

/** @since TODO */
/** @since 2.161 */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static void fireUserCreated(@Nonnull String username) {
LOGGER.log(Level.FINE, "new user created: {0}", username);
for (SecurityListener l : all()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
* {@code jenkins.security.stapler.StaplerDispatchValidator.disabled=true} or setting {@link #DISABLED} to
* {@code true} in the script console.</p>
*
* @since TODO
* @since 2.176.2 / 2.186

@daniel-beck daniel-beck Oct 13, 2019

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Restricted(NoExternalUse.class)
public class StaplerDispatchValidator implements DispatchValidator {
Expand Down
15 changes: 8 additions & 7 deletions update-since-todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@

set -euo pipefail

me=`basename "$0"`
me="$( basename "$0" )"

IFS=$'\n'
for todo in $( git grep --line-number '@since TODO' | grep -v "$me" )
do
#echo "TODO: $todo"
file=$( echo $todo | cut -d : -f 1 )
line=$( echo $todo | cut -d : -f 2 )
file=$( echo "$todo" | cut -d : -f 1 )
line=$( echo "$todo" | cut -d : -f 2 )

echo "Analyzing $file:$line"

lineSha=$( git blame --porcelain -L $line,$line $file | head -1 | cut -d ' ' -f 1 )
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" | head -1 )

if [[ ! -z $firstTag ]]; then
if [[ -n $firstTag ]]; then
echo -e "\tfirst tag was $firstTag"
echo -e "\tUpdating file in place"
sedExpr="${line}s/@since TODO/@since ${firstTag//jenkins-/}/"
sed -i $sedExpr $file
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"
fi
Expand Down