From 12634ab9d77ee88decbf0b1f8617b96fb4e09c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linas=20Vep=C5=A1tas?= Date: Mon, 20 May 2024 21:47:58 -0500 Subject: [PATCH] Fix issue #1510 Apparently, the new Character('x') style is deprecated. The fix is described here: https://stackoverflow.com/questions/67093884/deprecated-shortstring-how-to-update --- bindings/java/org/linkgrammar/JSONReader.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bindings/java/org/linkgrammar/JSONReader.java b/bindings/java/org/linkgrammar/JSONReader.java index 23e5b65b40..34fb28e89d 100644 --- a/bindings/java/org/linkgrammar/JSONReader.java +++ b/bindings/java/org/linkgrammar/JSONReader.java @@ -39,14 +39,14 @@ public class JSONReader private static Map escapes = new HashMap(); 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; @@ -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