-
-
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
IntelliJ/Java: Duplicate code -- Refactored as ExtensionFinder.getClassFromIndex #4079
IntelliJ/Java: Duplicate code -- Refactored as ExtensionFinder.getClassFromIndex #4079
Conversation
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.
Thx for the split, lot easier to review the changes!
nitpick: as you modified the duplicate code, you can ensure consistency by putting { ... }
around the last else
statement (the one for throw new AssertionError();
) (looking forward to have a better multiline suggestion feature from GH)
14bd9f2
to
4e1fe91
Compare
4e1fe91
to
e95fe1c
Compare
@Wadeck: added as a distinct commit because there are two places where that seems useful. |
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.
It is a protected method in the public class, so formally it is a part of binary API. Please either add Javadoc (with @since TODO
) or make it private. The rest looks good to me
e95fe1c
to
faff454
Compare
@@ -758,5 +737,20 @@ private Level logLevel(IndexItem<Extension, Object> item) { | |||
} | |||
} | |||
|
|||
private static Class<?> getClassFromIndex(IndexItem<Extension, Object> item) throws InstantiationException { |
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.
@oleg-nenashev: marked as private
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.
Thanks!
…ssFromIndex (jenkinsci#4079) * IntelliJ/Java: Duplicate code -- Refactored as ExtensionFinder.getClassFromIndex * Adding braces around throw new AssertionError
This is for discussion.
Notes:
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
@Wadeck