@@ -679,13 +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 )
683- || (object instanceof String && ((String ) object )
684- .equalsIgnoreCase ("false" ))) {
682+ if (Boolean .FALSE .equals (object )
683+ || (object instanceof String && "false" .equalsIgnoreCase ((String ) object ))) {
685684 return false ;
686- } else if (object .equals (Boolean .TRUE )
687- || (object instanceof String && ((String ) object )
688- .equalsIgnoreCase ("true" ))) {
685+ } else if (Boolean .TRUE .equals (object )
686+ || (object instanceof String && "true" .equalsIgnoreCase ((String ) object ))) {
689687 return true ;
690688 }
691689 throw wrongValueFormatException (key , "Boolean" , object , null );
@@ -1911,7 +1909,7 @@ private static <A extends Annotation> A getAnnotation(final Method m, final Clas
19111909 }
19121910
19131911 //If the superclass is Object, no annotations will be found any more
1914- if (c . getSuperclass () .equals (Object . class ))
1912+ if (Object . class .equals (c . getSuperclass () ))
19151913 return null ;
19161914
19171915 try {
@@ -1969,7 +1967,7 @@ private static int getAnnotationDepth(final Method m, final Class<? extends Anno
19691967 }
19701968
19711969 //If the superclass is Object, no annotations will be found any more
1972- if (c . getSuperclass () .equals (Object . class ))
1970+ if (Object . class .equals (c . getSuperclass () ))
19731971 return -1 ;
19741972
19751973 try {
@@ -3022,7 +3020,7 @@ private static JSONException recursivelyDefinedObjectException(String key) {
30223020 * @return number without leading zeros
30233021 */
30243022 private static String removeLeadingZerosOfNumber (String value ){
3025- if (value . equals ( "-" )){return value ;}
3023+ if ("-" . equals ( value )){return value ;}
30263024 boolean negativeFirstChar = (value .charAt (0 ) == '-' );
30273025 int counter = negativeFirstChar ? 1 :0 ;
30283026 while (counter < value .length ()){
0 commit comments