Skip to content

Commit

Permalink
fix: Fix-up NullPointerException
Browse files Browse the repository at this point in the history
Fixes issue where the user property may have a null project name.
  • Loading branch information
slide committed Nov 26, 2024
1 parent d4fd227 commit dbd9915
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public List<EmailTrigger> getTriggers() {
User current = User.current();
if (current != null) {
UserProperty p = current.getProperty(UserProperty.class);
if (p != null && p.getProjectName().equalsIgnoreCase(project.getFullName())) {
if (p != null && project.getFullName().equalsIgnoreCase(p.getProjectName())) {

Check warning on line 130 in src/main/java/hudson/plugins/emailext/watching/EmailExtWatchAction.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 130 is not covered by tests
return p.getTriggers();
}
}
Expand Down

0 comments on commit dbd9915

Please sign in to comment.