Skip to content

Fix PluginWrapper bug and cleanup Javadoc placeholders#25984

Merged
MarkEWaite merged 11 commits intojenkinsci:masterfrom
shbhmexe:fix/jenkins-core-cleanup-and-sync
Dec 30, 2025
Merged

Fix PluginWrapper bug and cleanup Javadoc placeholders#25984
MarkEWaite merged 11 commits intojenkinsci:masterfrom
shbhmexe:fix/jenkins-core-cleanup-and-sync

Conversation

@shbhmexe
Copy link
Contributor

@shbhmexe shbhmexe commented Dec 25, 2025

This PR fixes a logic bug in an unused, deprecated method in PluginWrapper and updates placeholder version numbers in Javadoc deprecation annotations.

Testing done

  • Verified compilation with mvn compile -pl core -q - PASSED
  • Manual verification of Javadoc changes

Proposed changelog entries

  • Fix incorrect variable passed in deprecated PluginWrapper.setOptionalDependants() method.

Proposed changelog category

/label skip-changelog

Proposed upgrade guidelines

N/A

Submitter checklist

  • The issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.

Desired reviewers

@jenkinsci/core-pr-reviewers

- Fix inconsistent synchronization in Fingerprint.java on 'usages' field by synchronizing on 'this'.
- Fix logic bug in PluginWrapper.java where setOptionalDependants passed incorrect field instead of parameter.
- Replace Boolean.getBoolean with SystemProperties.getBoolean in Jenkins.java and JnlpSlaveRestarterInstaller.java for best practices.
- Update placeholder version numbers (@deprecated and @SInCE) in StreamTaskListener, StreamBuildListener, and JNLPLauncher.

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
@comment-ops-bot comment-ops-bot bot added the bug For changelog: Minor bug. Will be listed after features label Dec 25, 2025
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

This seems like a combination of multiple changes into a single pull request. Please limit the scope of changes in pull requests so that reviewers are more likely to review the change and so that they can be clearly described.

The change of argument for the setOptionalDependants method is correct. Since the method is unused, the change will likely have no effect, but the change is correct.

The updates of the Javadoc comments generally mention a version prior to the deprecation. We list the version that first deprecated the method. Since there are very few of these cases, it is probably not worth the effort to update the update-since-todo.py script that automates the replacement of TODO with a release date.

The change of synchronization in the Fingerprint class does not have enough justification for the change and it lacks testing. If that justification and testing are added, it should be a separate commit.

The change from Boolean.getBoolean() to SystemProperties.getBoolean does not have enough justification for the change. Specifically, there is no mention of a reason why the ServletContext init context should be consulted for the property in addition to checking the system properties. If that justification and sufficient testing are added, it should be a separate commit

@shbhmexe
Copy link
Contributor Author

This seems like a combination of multiple changes into a single pull request. Please limit the scope of changes in pull requests so that reviewers are more likely to review the change and so that they can be clearly described.

The change of argument for the setOptionalDependants method is correct. Since the method is unused, the change will likely have no effect, but the change is correct.

The updates of the Javadoc comments generally mention a version prior to the deprecation. We list the version that first deprecated the method. Since there are very few of these cases, it is probably not worth the effort to update the update-since-todo.py script that automates the replacement of TODO with a release date.

The change of synchronization in the Fingerprint class does not have enough justification for the change and it lacks testing. If that justification and testing are added, it should be a separate commit.

The change from Boolean.getBoolean() to SystemProperties.getBoolean does not have enough justification for the change. Specifically, there is no mention of a reason why the ServletContext init context should be consulted for the property in addition to checking the system properties. If that justification and sufficient testing are added, it should be a separate commit

Thank you for the feedback @MarkEWaite. I understand your concern about the PR scope. I will split this PR into separate, focused pull requests:

Javadoc version updates - Fixing deprecated version placeholders
PluginWrapper bug fix - The setOptionalDependants parameter fix
Synchronization change - Will create separately with proper justification and tests
SystemProperties changes - Will create separately with proper justification
Will close this PR and create focused ones. Thank you!

shbhmexe and others added 7 commits December 25, 2025 21:33
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
…Installer.java

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
@MarkEWaite
Copy link
Contributor

In its current state, the changes in this pull request look reasonable, so long as the pull request description is updated to complete the pull request template and remove mention of things that are no longer being changed in this pull request.

@MarkEWaite MarkEWaite added skip-changelog Should not be shown in the changelog and removed bug For changelog: Minor bug. Will be listed after features labels Dec 28, 2025
@comment-ops-bot comment-ops-bot bot added the bug For changelog: Minor bug. Will be listed after features label Dec 28, 2025
@shbhmexe
Copy link
Contributor Author

Thanks @MarkEWaite! I've updated the PR description to reflect only the current changes (PluginWrapper fix + Javadoc updates). Removed mention of Fingerprint and SystemProperties changes.

@daniel-beck daniel-beck added the squash-merge-me Unclean or useless commit history, should be merged only with squash-merge label Dec 28, 2025
@daniel-beck
Copy link
Member

Fix synchronization

???

@shbhmexe
Copy link
Contributor Author

shbhmexe commented Dec 28, 2025

Sorry, I forgot to update the PR title! The synchronization change was removed per earlier feedback. This PR now only contains the PluginWrapper fix and Javadoc version placeholder updates. Updated the title now.

@shbhmexe shbhmexe changed the title Fix synchronization, PluginWrapper bug, and cleanup Javadoc Fix PluginWrapper bug and cleanup Javadoc placeholders Dec 28, 2025
@MarkEWaite MarkEWaite added bug For changelog: Minor bug. Will be listed after features and removed bug For changelog: Minor bug. Will be listed after features labels Dec 28, 2025
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

/label ready-for-merge

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 29, 2025
@MarkEWaite MarkEWaite merged commit 11acb48 into jenkinsci:master Dec 30, 2025
12 of 14 checks passed
@shbhmexe shbhmexe deleted the fix/jenkins-core-cleanup-and-sync branch December 30, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback skip-changelog Should not be shown in the changelog squash-merge-me Unclean or useless commit history, should be merged only with squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants