Skip to content

Commit

Permalink
Fix NPE in Cas10Protocol with empty Groovy script (JENKINS-45441)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcrespel committed Sep 26, 2017
1 parent bb4c0c6 commit 66b5a91
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ public TicketValidator createTicketValidator(String casServerUrl) {
}

private static SecureGroovyScript getSecureGroovyScript(String script, boolean sandbox) {
return new SecureGroovyScript(script, sandbox, null).configuringWithKeyItem();
if (script == null) {
return null;
} else {
return new SecureGroovyScript(script, sandbox, null).configuringWithKeyItem();
}
}

@Extension
Expand Down

0 comments on commit 66b5a91

Please sign in to comment.