File tree Expand file tree Collapse file tree
framework/src/test/java/org/tron/json Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import java .util .Arrays ;
1515import java .util .Date ;
1616import java .util .List ;
17+ import java .util .Locale ;
1718import org .junit .Test ;
1819
1920/**
@@ -382,7 +383,7 @@ public void testParseObjectRejectsOverDepth() {
382383 }
383384 String deep = open + "1" + close ;
384385 JSONException e = assertThrows (JSONException .class , () -> JSON .parseObject (deep ));
385- assertTrue (e .getMessage ().toLowerCase ().contains ("depth" ));
386+ assertTrue (e .getMessage ().toLowerCase (Locale . ROOT ).contains ("depth" ));
386387 }
387388
388389 @ Test
@@ -393,7 +394,7 @@ public void testParseArrayRejectsOverTokenCount() {
393394 }
394395 sb .append (']' );
395396 JSONException e = assertThrows (JSONException .class , () -> JSON .parseArray (sb .toString ()));
396- assertTrue (e .getMessage ().toLowerCase ().contains ("token" ));
397+ assertTrue (e .getMessage ().toLowerCase (Locale . ROOT ).contains ("token" ));
397398 }
398399
399400 public static class Pojo {
You can’t perform that action at this time.
0 commit comments