Skip to content

Commit

Permalink
Fix issue #1510
Browse files Browse the repository at this point in the history
Apparently, the new Character('x') style is deprecated. The fix is
described here:
https://stackoverflow.com/questions/67093884/deprecated-shortstring-how-to-update
  • Loading branch information
linas committed May 21, 2024
1 parent e2db5ac commit 12634ab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bindings/java/org/linkgrammar/JSONReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public class JSONReader
private static Map<Character, Character> escapes = new HashMap<Character, Character>();
static
{
escapes.put(new Character('"'), new Character('"'));
escapes.put(new Character('\\'), new Character('\\'));
escapes.put(new Character('/'), new Character('/'));
escapes.put(new Character('b'), new Character('\b'));
escapes.put(new Character('f'), new Character('\f'));
escapes.put(new Character('n'), new Character('\n'));
escapes.put(new Character('r'), new Character('\r'));
escapes.put(new Character('t'), new Character('\t'));
escapes.put(Character.valueOf('"'), Character.valueOf('"'));
escapes.put(Character.valueOf('\\'), Character.valueOf('\\'));
escapes.put(Character.valueOf('/'), Character.valueOf('/'));
escapes.put(Character.valueOf('b'), Character.valueOf('\b'));
escapes.put(Character.valueOf('f'), Character.valueOf('\f'));
escapes.put(Character.valueOf('n'), Character.valueOf('\n'));
escapes.put(Character.valueOf('r'), Character.valueOf('\r'));
escapes.put(Character.valueOf('t'), Character.valueOf('\t'));
}

private CharacterIterator it;
Expand Down Expand Up @@ -304,7 +304,7 @@ private Object string()
}
else
{
Character value = escapes.get(new Character(c));
Character value = escapes.get(Character.valueOf(c));
if (value != null)
add(value);
else
Expand Down

0 comments on commit 12634ab

Please sign in to comment.