-
-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java cleanup #4034
Java cleanup #4034
Conversation
AntClassLoader.getUrl
ApiTokenProperty.checkPermission
Refactored as ChunkedInputStream.advanceChunk
Reused Computer.resolveForCLI
Refactored as SettingsPath.getSettings
Refactored as Run.getBuildsOverThreshold
Refactored as View.makeSearchIndex
Refactored as PluginManager.logPluginWarnings
836bdf1
to
322e9f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After partial review, I am not sure to see the interest in adding complexity with new helper classes for case that are duplicate along different files.
Also some concerns about the restriction and the return code for CLI.
No blocker for me, but neither an approval ;)
89dc9b6
to
948acc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most commits were created by IntelliJ
Could you elaborate on which parts are made by IntelliJ and which are "human created"?
I tried to add some suggestions, but they are not useful because you need to rename the use of the classes as well.
abstract static
methods, please change the behavior, it's broken.
Due to the huge amount of changes here, I cannot support/help more without spending too much time.
core/src/main/java/hudson/cli/CLIReportUnexpectedException.java
Outdated
Show resolved
Hide resolved
core/src/main/java/hudson/tasks/UnstableAwareCommandInterpreter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please breakdown the PR to multiple ones?
I see several changes there (just refactoring, using class index and so on), and I do not think it fits a single PR
@oleg-nenashev: This should now just contain the boring portions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall. New API methods (included protected) should be properly documented before merging
Thanks @oleg-nenashev; changes applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New API methods (included protected) should be properly documented before merging
@oleg-nenashev: updated -- I also dropped a param, I'm hoping that works... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the force-push, I cannot see my initial request being corrected or not.
* if not enough builds satisfying the threshold have been found. Never null. | ||
* @since TODO | ||
*/ | ||
protected @Nonnull List<RunT> getBuildsOverThreshold(RunT r, int numberOfBuilds, @Nonnull Result threshold) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be even made a public API now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want it to be, sure. I'm trying not to change public api surfaces in these PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected
is also a public API, so no big difference 🤷♂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, if people are ok w/ switching to public, I don't mind, it seemed like a reasonable improvement, I'm just not terribly familiar w/ how jenkins does api design.
Co-Authored-By: Oleg Nenashev <[email protected]>
@jsoref this PR has been proposed for close. First of all, sorry for not pinging you previously because you didn't receive any notification when the label was added. |
Like previous comment, I cannot review the changes, so I dunno if my change requests were applied or not. No time to look again at it. I cannot remove myself from the review list without being again "requesting a change" -.- |
This is for discussion.
Notes:
This is generally a subset of https://github.com/jsoref/jenkins/commits/java-cleanup-full
Proposed changelog entries
Internal:
Internal Java code cleanupSubmitter checklist
* Use the
Internal:
prefix if the change has no user-visible impact (API, test frameworks, etc.)Desired reviewers