From 97023e1098d9afddb1b57aad5a7ea57b50732df2 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Mon, 31 May 2021 14:53:59 +0200 Subject: [PATCH 1/2] Fix Javadoc formatting in JSONObject and XMLParserConfiguration --- src/main/java/org/json/JSONObject.java | 3 --- src/main/java/org/json/XMLParserConfiguration.java | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java index 8bbb874b3..82da3cac6 100644 --- a/src/main/java/org/json/JSONObject.java +++ b/src/main/java/org/json/JSONObject.java @@ -1627,9 +1627,6 @@ private static A getAnnotation(final Method m, final Clas * implementations and interfaces has the annotation. Returns the depth of the * annotation in the hierarchy. * - * @param - * type of the annotation - * * @param m * method to check * @param annotationClass diff --git a/src/main/java/org/json/XMLParserConfiguration.java b/src/main/java/org/json/XMLParserConfiguration.java index b9e752c28..165a4062f 100644 --- a/src/main/java/org/json/XMLParserConfiguration.java +++ b/src/main/java/org/json/XMLParserConfiguration.java @@ -94,7 +94,7 @@ public XMLParserConfiguration (final boolean keepStrings) { * Configure the parser string processing to try and convert XML values to JSON values and * use the passed CDATA Tag Name the processing value. Pass null to * disable CDATA processing - * @param cDataTagNamenull to disable CDATA processing. Any other value + * @param cDataTagName null to disable CDATA processing. Any other value * to use that value as the JSONObject key name to process as CDATA. * @deprecated This constructor has been deprecated in favor of using the new builder * pattern for the configuration. @@ -109,7 +109,7 @@ public XMLParserConfiguration (final String cDataTagName) { * Configure the parser to use custom settings. * @param keepStrings true to parse all values as string. * false to try and convert XML string values into a JSON value. - * @param cDataTagNamenull to disable CDATA processing. Any other value + * @param cDataTagName null to disable CDATA processing. Any other value * to use that value as the JSONObject key name to process as CDATA. * @deprecated This constructor has been deprecated in favor of using the new builder * pattern for the configuration. From b48abe655853107a3705af11d8b401ade4a2385d Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Mon, 31 May 2021 15:00:29 +0200 Subject: [PATCH 2/2] Suppress java/unchecked-cast-in-equals warning for JSONObject.Null.equals() --- src/main/java/org/json/JSONObject.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java index 82da3cac6..131d02f5f 100644 --- a/src/main/java/org/json/JSONObject.java +++ b/src/main/java/org/json/JSONObject.java @@ -128,6 +128,7 @@ protected final Object clone() { * null. */ @Override + @SuppressWarnings("lgtm[java/unchecked-cast-in-equals]") public boolean equals(Object object) { return object == null || object == this; }