Skip to content

Commit d646a97

Browse files
authored
Build scan - allow issue type to be case-insensitive (#554)
1 parent b8b5aef commit d646a97

File tree

1 file changed

+6
-4
lines changed
  • build-info-client/src/main/java/org/jfrog/build/client/artifactoryXrayResponse

1 file changed

+6
-4
lines changed

build-info-client/src/main/java/org/jfrog/build/client/artifactoryXrayResponse/Issue.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.jfrog.build.client.artifactoryXrayResponse;
22

33
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import org.apache.commons.lang.StringUtils;
45
import org.apache.commons.lang.builder.ToStringBuilder;
56

67
import java.io.Serializable;
@@ -115,10 +116,11 @@ public enum IssueType {
115116
}
116117

117118
public IssueType getIssueType() {
118-
if ("Security".equals(this.getType())) {
119-
return IssueType.SECURITY;
120-
} else if ("License".equals(this.getType())) {
121-
return IssueType.LICENSE;
119+
switch (StringUtils.defaultString(getType()).toUpperCase()) {
120+
case "SECURITY":
121+
return IssueType.SECURITY;
122+
case "LICENSE":
123+
return IssueType.LICENSE;
122124
}
123125
return null;
124126
}

0 commit comments

Comments
 (0)