@@ -679,11 +679,11 @@ public <E extends Enum<E>> E getEnum(Class<E> clazz, String key) throws JSONExce
679679 */
680680 public boolean getBoolean (String key ) throws JSONException {
681681 Object object = this .get (key );
682- if (object . equals ( Boolean .FALSE )
682+ if (Boolean .FALSE . equals ( object )
683683 || (object instanceof String && ((String ) object )
684684 .equalsIgnoreCase ("false" ))) {
685685 return false ;
686- } else if (object . equals ( Boolean .TRUE )
686+ } else if (Boolean .TRUE . equals ( object )
687687 || (object instanceof String && ((String ) object )
688688 .equalsIgnoreCase ("true" ))) {
689689 return true ;
@@ -1911,7 +1911,7 @@ private static <A extends Annotation> A getAnnotation(final Method m, final Clas
19111911 }
19121912
19131913 //If the superclass is Object, no annotations will be found any more
1914- if (c . getSuperclass () .equals (Object . class ))
1914+ if (Object . class .equals (c . getSuperclass () ))
19151915 return null ;
19161916
19171917 try {
@@ -1969,7 +1969,7 @@ private static int getAnnotationDepth(final Method m, final Class<? extends Anno
19691969 }
19701970
19711971 //If the superclass is Object, no annotations will be found any more
1972- if (c . getSuperclass () .equals (Object . class ))
1972+ if (Object . class .equals (c . getSuperclass () ))
19731973 return -1 ;
19741974
19751975 try {
@@ -2751,9 +2751,6 @@ private static Object wrap(Object object, Set<Object> objectsRecord) {
27512751
27522752 private static Object wrap (Object object , Set <Object > objectsRecord , int recursionDepth , JSONParserConfiguration jsonParserConfiguration ) {
27532753 try {
2754- if (NULL .equals (object )) {
2755- return NULL ;
2756- }
27572754 if (object instanceof JSONObject || object instanceof JSONArray
27582755 || NULL .equals (object ) || object instanceof JSONString
27592756 || object instanceof Byte || object instanceof Character
@@ -3022,7 +3019,7 @@ private static JSONException recursivelyDefinedObjectException(String key) {
30223019 * @return number without leading zeros
30233020 */
30243021 private static String removeLeadingZerosOfNumber (String value ){
3025- if (value . equals ( "-" )){return value ;}
3022+ if ("-" . equals ( value )){return value ;}
30263023 boolean negativeFirstChar = (value .charAt (0 ) == '-' );
30273024 int counter = negativeFirstChar ? 1 :0 ;
30283025 while (counter < value .length ()){
0 commit comments