Skip to content

Commit

Permalink
Build scan - allow issue type to be case-insensitive (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Sep 19, 2021
1 parent b8b5aef commit d646a97
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jfrog.build.client.artifactoryXrayResponse;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;
Expand Down Expand Up @@ -115,10 +116,11 @@ public enum IssueType {
}

public IssueType getIssueType() {
if ("Security".equals(this.getType())) {
return IssueType.SECURITY;
} else if ("License".equals(this.getType())) {
return IssueType.LICENSE;
switch (StringUtils.defaultString(getType()).toUpperCase()) {
case "SECURITY":
return IssueType.SECURITY;
case "LICENSE":
return IssueType.LICENSE;
}
return null;
}
Expand Down

0 comments on commit d646a97

Please sign in to comment.