diff --git a/src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java b/src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java index 6ed87c3ec..7cdd9a5e3 100644 --- a/src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java +++ b/src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java @@ -119,7 +119,10 @@ public void onPost(final GitHubTriggerEvent event) { } } - String lowercaseTriggeredByUser = event.getTriggeredByUser() != null? event.getTriggeredByUser().toLowerCase(): null; + String lowercaseTriggeredByUser = null; + if (event.getTriggeredByUser() != null) { + lowercaseTriggeredByUser = event.getTriggeredByUser().toLowerCase(); + } if (lowercaseExcludedUsers != null && lowercaseExcludedUsers.contains(lowercaseTriggeredByUser)) { return; // user is excluded from triggering build }