From dbd9915909940e4968884b0d7296d962d37b80f5 Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Mon, 25 Nov 2024 15:36:31 -0700 Subject: [PATCH] fix: Fix-up NullPointerException Fixes issue where the user property may have a null project name. --- .../hudson/plugins/emailext/watching/EmailExtWatchAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/hudson/plugins/emailext/watching/EmailExtWatchAction.java b/src/main/java/hudson/plugins/emailext/watching/EmailExtWatchAction.java index f145f985..1f433b57 100644 --- a/src/main/java/hudson/plugins/emailext/watching/EmailExtWatchAction.java +++ b/src/main/java/hudson/plugins/emailext/watching/EmailExtWatchAction.java @@ -127,7 +127,7 @@ public List 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())) { return p.getTriggers(); } }