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

[JENKINS-50251] the fix introduces a new NullPointerException if ciM… #116

Closed

Conversation

Projects
None yet
5 participants
@rainerfrey
Copy link

commented Mar 26, 2018

…anagement does not specify a system other than hudson.

The consuming classes do check for a null PomInfo#mailNotifier, but in this case the NotifierInfo instance is created, but it refers to a null Notifier.
This fix only creates the wrapping NotifierInfo when a Notifier was found.

JENKINS-50251 amending #115

[JENKINS-50251] the fix introduces a new NullPointerException if <ciM…
…anagement> does not specify a system other than hudson.

The consuming classes do check for a null PomInfo#mailNotifier, but in this case the NotifierInfo instance is created, but it refers to a null Notifier.
This fix only creates the wrapping NotifierInfo when a Notifier was found.
@aheritier
Copy link
Member

left a comment

Cannot compile @rainerfrey

@@ -183,7 +183,8 @@ public PomInfo(MavenProject project, PomInfo parent, String relPath) {
break;
}
}
this.mailNotifier = new NotifierInfo(mailNotifier);
if (mailNotifier!=null)

This comment has been minimized.

Copy link
@aheritier

aheritier Mar 26, 2018

Member

It doesn't compile

maven-plugin/src/main/java/hudson/maven/PomInfo.java:[194,5] variable mailNotifier might not have been initialized

You have to add

            else
                this.mailNotifier = null;

@aheritier aheritier added the needs-fix label Mar 26, 2018

@jglick jglick referenced this pull request Mar 26, 2018

Merged

Fix NPE #117

@jglick

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

#117 ought to do it.

@aheritier

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

Fixed by #117

@aheritier aheritier closed this Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.