Skip to content

Commit

Permalink
Merge pull request #103 from dobbymoodge/JENKINS-40786
Browse files Browse the repository at this point in the history
JENKINS-40786 - check constructor for null values
  • Loading branch information
Jimilian committed Jan 11, 2017
2 parents 30e3d7b + 5ceaf17 commit 5d17f47
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/hudson/plugins/s3/S3BucketPublisher.java
Expand Up @@ -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;
Expand Down

0 comments on commit 5d17f47

Please sign in to comment.