Skip to content
Permalink
Browse files
Merge pull request #103 from dobbymoodge/JENKINS-40786
JENKINS-40786 - check constructor for null values
  • Loading branch information
Jimilian committed Jan 11, 2017
2 parents 30e3d7b + 5ceaf17 commit 5d17f478ed6722b2dc5c87da7e2a03a373bc7c63
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/hudson/plugins/s3/S3BucketPublisher.java
@@ -69,10 +69,16 @@ public S3BucketPublisher(String profileName, List<Entry> entries, List<MetadataP

this.dontWaitForConcurrentBuildCompletion = dontWaitForConcurrentBuildCompletion;
this.consoleLogLevel = parseLevel(consoleLogLevel);
this.pluginFailureResultConstraint = Result.fromString(pluginFailureResultConstraint);
if (pluginFailureResultConstraint == null) {
this.pluginFailureResultConstraint = Result.FAILURE;
} else {
this.pluginFailureResultConstraint = Result.fromString(pluginFailureResultConstraint);
}
}

private Level parseLevel(String lvl) {
if (lvl == null)
lvl = "";
switch (lvl) {
case "WARNING": return Level.WARNING;
case "SEVERE": return Level.SEVERE;

0 comments on commit 5d17f47

Please sign in to comment.