-
Notifications
You must be signed in to change notification settings - Fork 245
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
Code improvements #228
Code improvements #228
Conversation
offa
commented
Sep 21, 2021
- Code clean-up
- Deprecated APIs replaced (still some left)
- Missing nullability annotations added
- JSR 305 annotations replaced
- Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- Ensure that the pull request title represents the desired changelog entry
- Please describe what you did
- Link to relevant issues in GitHub or Jira
- Link to relevant pull requests, esp. upstream and downstream changes
- Ensure you have provided tests - that demonstrates feature works or fixes the issue
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.
Ran out of time to review further. Will require detailed review from someone experienced in Jenkins code before merging to ensure there are no regressions.
src/main/java/com/cloudbees/plugins/credentials/CredentialsDescriptor.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsNameProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsNameProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsParameterDefinition.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsParameterDefinition.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsParameterDefinition.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Thanks for your review, I have addressed all comments. |
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
src/main/java/com/cloudbees/plugins/credentials/CredentialsResolver.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.
👍 For Lambda, NonNull refactoring, import optimization it seems to be fine. (those are proposed by IntelliJ)
getDeclaredConstructor
, I will not merge this without an explanation of the benefit using this approach, it seems less interesting than current version. Perhaps it's just me not knowing why you are doing that ;-)
So, either you provide the advantage/rationale of that approach or you remove them from this PR so that I can merge it.
💡 In general, I would say that I prefer to have PRs without a mix of manual proposals and IntelliJ (or other tool) proposals. The manual ones require more review than the automated ones. And saying it came from a tool in the PR description also helps ;)
Thanks for your contribution @offa 👍
src/main/java/com/cloudbees/plugins/credentials/CredentialsResolver.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/UserCredentialsProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cloudbees/plugins/credentials/impl/UsernamePasswordCredentialsImpl.java
Outdated
Show resolved
Hide resolved
If you want me to update your PR and merge it just tell me ;) |
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
I'm on Java 11+ and However, it's better to get a consensus here, so I'll remove it from this PR and in doubt provide a follow up. |
Thanks 😄, but I've committed |
Perfect yes thank you :)
Will check the latest version and adjust if necessary before merge 👍
Thanks for the link and the rationale, will keep that in a place of my brain for next reviews / plugins 👍 |
# Conflicts: # src/test/java/com/cloudbees/plugins/credentials/casc/CredentialsCategoryTest.java
Will merge once the CI is good :) |
@offa Thanks for the contribution! Don't hesitate to make others, Hacktoberfest started today, you can gain a t-shirt with 5 approved PRs during October, more info on https://hacktoberfest.digitalocean.com/ |
Use |
src/main/java/com/cloudbees/plugins/credentials/impl/UsernamePasswordCredentialsImpl.java
Outdated
Show resolved
Hide resolved
src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTest.java
Outdated
Show resolved
Hide resolved
(still reviewing) |
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 other than a couple of nits. Thanks!