File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
main/java/org/owasp/benchmarkutils/score
test/java/org/owasp/benchmarkutils/score Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2222import java .io .InputStream ;
2323import java .io .SequenceInputStream ;
2424import java .util .Map ;
25+ import org .yaml .snakeyaml .LoaderOptions ;
2526import org .yaml .snakeyaml .Yaml ;
2627
2728/**
@@ -76,7 +77,16 @@ public class Configuration {
7677
7778 public final Report report ;
7879
79- private static final Yaml yaml = new Yaml ();
80+ private static final Yaml yaml = new Yaml (defaultLoaderOptions ());
81+
82+ private static LoaderOptions defaultLoaderOptions () {
83+ LoaderOptions loaderOptions = new LoaderOptions ();
84+
85+ loaderOptions .setAllowDuplicateKeys (true );
86+ loaderOptions .setWarnOnDuplicateKeys (false );
87+
88+ return loaderOptions ;
89+ }
8090
8191 public static Configuration fromDefaultConfig () {
8292 return fromInputStream (resourceAsStream (DEFAULT_CONFIG ), DEFAULT_SUCCESS_MESSAGE );
Original file line number Diff line number Diff line change 2828
2929public class BenchmarkScoreTest {
3030
31- private static final String SEP = System .getProperty ( "line.separator" );
31+ private static final String SEP = System .lineSeparator ( );
3232 private final ByteArrayOutputStream outContent = new ByteArrayOutputStream ();
3333 private final PrintStream originalOut = System .out ;
3434
You can’t perform that action at this time.
0 commit comments