Skip to content

Commit

Permalink
json output minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Przemek Bednarek committed Jun 29, 2018
1 parent b866dc8 commit 041320c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/cognifide/secureaem/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ private static List<TestLoader> createTestLoaders(CommandLine cmdLine)
List<TestLoader> testLoaders = new ArrayList<>();
String line;
while ((line = reader.readLine()) != null) {
String[] parameters = line.split(", ");
String[] parameters = line.split(",");
if (parameters.length >= 2) {
Class clazz = Class.forName(parameters[0]);
Class clazz = Class.forName(parameters[0].trim());
Severity severity = Severity.MAJOR;
if (parameters.length == 3) {
severity = Severity.of(parameters[2]);
severity = Severity.of(parameters[2].trim());
}
testLoaders.add(new TestLoader(clazz, parameters[1], severity));
testLoaders.add(new TestLoader(clazz, parameters[1].trim(), severity));
}
}
return testLoaders;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cognifide/secureaem/json/Severity.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ private Severity(String value) {
public static Severity of(String value) {
return Arrays.stream(Severity.values())
.filter(severity -> StringUtils.equals(severity.value, value))
.findFirst().orElse(null);
.findFirst().orElse(INFO);
}
}

0 comments on commit 041320c

Please sign in to comment.