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

Fix NPE on job saving when previous Builds are absent (baseline == null) #3

Merged
merged 1 commit into from Nov 21, 2011

Conversation

2 participants
@8nevil8
Contributor

8nevil8 commented Nov 21, 2011

I have faced with NPE while using the latest version of this plugin with PMD and Checkstyle plugins. When I tried to save job configuration and there were no previous builds for current job, I get the following stacktrace:
WARNING: Caught exception evaluating: from.canShowEnableTrendLink(request). Reason: java.lang.NullPointerException
java.lang.NullPointerException
at hudson.plugins.analysis.core.BuildHistory.getBaseline(BuildHistory.java:178)
at hudson.plugins.analysis.graph.GraphConfigurationView.(GraphConfigurationView.java:63)
at hudson.plugins.analysis.graph.UserGraphConfigurationView.(UserGraphConfigurationView.java:36)
at hudson.plugins.analysis.core.AbstractProjectAction.createUserConfiguration(AbstractProjectAction.java:219)
Proposed request solves them. Tested on the latest version of analysis-core, PMD, Checkstyle

@uhafner

This comment has been minimized.

Show comment
Hide comment
@uhafner

uhafner Nov 21, 2011

Member

Thanks for fixing that bug!

Member

uhafner commented Nov 21, 2011

Thanks for fixing that bug!

uhafner added a commit that referenced this pull request Nov 21, 2011

Merge pull request #3 from 8nevil8/master
Fix NPE on job saving when previous Builds are absent (baseline == null)

@uhafner uhafner merged commit 06f47a0 into jenkinsci:master Nov 21, 2011

@uhafner

This comment has been minimized.

Show comment
Hide comment
@uhafner

uhafner Nov 22, 2011

Member

I changed your patch somewhat. Hope that the new version will still work :-)

Member

uhafner commented Nov 22, 2011

I changed your patch somewhat. Hope that the new version will still work :-)

uhafner pushed a commit that referenced this pull request Apr 11, 2018

Merge pull request #3 from AlexanderPraegla/JENKINS-50074
 JENKINS-50074 Mockito Test for ByIdResultSelector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment