-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix issue with Jenkins 2.141 and changes for JENKINS-52818 #149
base: master
Are you sure you want to change the base?
Fix issue with Jenkins 2.141 and changes for JENKINS-52818 #149
Conversation
The new logic exposed this incorrect usage from this plugin. Had to add null guard because this is failing a findbugs test although the .get() method is marked with @nonnull annotation in the Jenkins core class.
+1 |
JenkinsLocationConfiguration globalConfig = new JenkinsLocationConfiguration(); | ||
String rootUrl = globalConfig.getUrl(); | ||
JenkinsLocationConfiguration globalConfig = JenkinsLocationConfiguration.get(); | ||
String rootUrl = globalConfig == null ? null : globalConfig.getUrl(); |
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.
JenkinsLocationConfiguration.get()
is @Nonnull
, so why check it for null
?
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.
See comment in description of this pull request. The build fails findbugs validation without the null check. Did not spend much time understanding why findbugs does not follow the @nonnull annotation.
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.
Sorry, I missed that part in PR description.
I was going to say that jenkinsci#26 has a passing build without the null check, but I've noticed it has no build configured
Unmaintained repo, unrelated to the Jenkins Project FYI. |
The new logic exposed this incorrect usage from this plugin.
Had to add null guard because this is failing a findbugs test
although the .get() method is marked with @nonnull annotation in
the Jenkins core class.
This fixes #148