From 939652c60167dccc8c745d56e30ead8fc824f45f Mon Sep 17 00:00:00 2001 From: Paul Stanton Date: Sat, 28 Mar 2020 14:05:30 +1100 Subject: [PATCH 1/2] remove deprecated static fields to avoid deadlock I cannot understand why this wasn't done 2.5 years ago. Your popular project is used in many projects however is woefully unreliable due to this very fixable issue. --- .../com/eclipsesource/json/JsonValue.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/com.eclipsesource.json/src/main/java/com/eclipsesource/json/JsonValue.java b/com.eclipsesource.json/src/main/java/com/eclipsesource/json/JsonValue.java index d9ca291..ded2b34 100644 --- a/com.eclipsesource.json/src/main/java/com/eclipsesource/json/JsonValue.java +++ b/com.eclipsesource.json/src/main/java/com/eclipsesource/json/JsonValue.java @@ -63,27 +63,6 @@ @SuppressWarnings("serial") // use default serial UID public abstract class JsonValue implements Serializable { - /** - * Represents the JSON literal true. - * @deprecated Use Json.TRUE instead - */ - @Deprecated - public static final JsonValue TRUE = new JsonLiteral("true"); - - /** - * Represents the JSON literal false. - * @deprecated Use Json.FALSE instead - */ - @Deprecated - public static final JsonValue FALSE = new JsonLiteral("false"); - - /** - * Represents the JSON literal null. - * @deprecated Use Json.NULL instead - */ - @Deprecated - public static final JsonValue NULL = new JsonLiteral("null"); - JsonValue() { // prevent subclasses outside of this package } From 82043fe1f126588834c2b55cba1145a2b85c64c0 Mon Sep 17 00:00:00 2001 From: Paul Stanton Date: Sat, 28 Mar 2020 14:15:46 +1100 Subject: [PATCH 2/2] Update JsonValue_Test.java --- .../test/java/com/eclipsesource/json/JsonValue_Test.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/com.eclipsesource.json/src/test/java/com/eclipsesource/json/JsonValue_Test.java b/com.eclipsesource.json/src/test/java/com/eclipsesource/json/JsonValue_Test.java index 57bf9c9..308cb00 100644 --- a/com.eclipsesource.json/src/test/java/com/eclipsesource/json/JsonValue_Test.java +++ b/com.eclipsesource.json/src/test/java/com/eclipsesource/json/JsonValue_Test.java @@ -38,14 +38,6 @@ public class JsonValue_Test { - @Test - @SuppressWarnings("deprecation") - public void testConstantsAreLiterals() { - assertEquals(Json.NULL, JsonValue.NULL); - assertEquals(Json.TRUE, JsonValue.TRUE); - assertEquals(Json.FALSE, JsonValue.FALSE); - } - @Test @SuppressWarnings("deprecation") public void valueOf_int() {