Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alex-Vol-SV
Copy link

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

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.
@2rba
Copy link

2rba commented Dec 3, 2018

+1

JenkinsLocationConfiguration globalConfig = new JenkinsLocationConfiguration();
String rootUrl = globalConfig.getUrl();
JenkinsLocationConfiguration globalConfig = JenkinsLocationConfiguration.get();
String rootUrl = globalConfig == null ? null : globalConfig.getUrl();

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?

Copy link
Author

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.

Copy link

@jakub-bochenski jakub-bochenski Dec 11, 2018

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

@batmat
Copy link

batmat commented Jan 21, 2019

Unmaintained repo, unrelated to the Jenkins Project FYI.
See #158

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JENKINS-52818 breaks build URL on Stash updates
4 participants