@@ -168,7 +168,7 @@ protected JSONArray(JSONTokener x) {
168168 public JSONArray (IntList list ) {
169169 myArrayList = new ArrayList <Object >();
170170 for (int item : list .values ()) {
171- myArrayList .add (new Integer (item ));
171+ myArrayList .add (Integer . valueOf (item ));
172172 }
173173 }
174174
@@ -718,7 +718,7 @@ public JSONArray append(String value) {
718718 * @return this.
719719 */
720720 public JSONArray append (int value ) {
721- this .append (new Integer (value ));
721+ this .append (Integer . valueOf (value ));
722722 return this ;
723723 }
724724
@@ -731,7 +731,7 @@ public JSONArray append(int value) {
731731 * @return this.
732732 */
733733 public JSONArray append (long value ) {
734- this .append (new Long (value ));
734+ this .append (Long . valueOf (value ));
735735 return this ;
736736 }
737737
@@ -758,7 +758,7 @@ public JSONArray append(float value) {
758758 * @return this.
759759 */
760760 public JSONArray append (double value ) {
761- Double d = new Double ( value ) ;
761+ Double d = value ;
762762 JSONObject .testValidity (d );
763763 this .append (d );
764764 return this ;
@@ -884,7 +884,7 @@ public JSONArray setString(int index, String value) {
884884 * @see JSONArray#setBoolean(int, boolean)
885885 */
886886 public JSONArray setInt (int index , int value ) {
887- this .set (index , new Integer (value ));
887+ this .set (index , Integer . valueOf (value ));
888888 return this ;
889889 }
890890
@@ -899,7 +899,7 @@ public JSONArray setInt(int index, int value) {
899899 * @throws JSONException If the index is negative.
900900 */
901901 public JSONArray setLong (int index , long value ) {
902- return set (index , new Long (value ));
902+ return set (index , Long . valueOf (value ));
903903 }
904904
905905
@@ -936,7 +936,7 @@ public JSONArray setFloat(int index, float value) {
936936 * not finite.
937937 */
938938 public JSONArray setDouble (int index , double value ) {
939- return set (index , new Double (value ));
939+ return set (index , Double . valueOf (value ));
940940 }
941941
942942
0 commit comments