diff --git a/src/main/java/com/volmit/iris/util/io/IO.java b/src/main/java/com/volmit/iris/util/io/IO.java index 4021315bb..46f626eb9 100644 --- a/src/main/java/com/volmit/iris/util/io/IO.java +++ b/src/main/java/com/volmit/iris/util/io/IO.java @@ -635,6 +635,7 @@ public class IO { * @return the requested byte array * @deprecated Use {@link String#getBytes()} */ + @Deprecated public static byte[] toByteArray(String input) { return input.getBytes(); } @@ -770,6 +771,7 @@ public class IO { * @return the requested String * @deprecated Use {@link String#String(byte[])} */ + @Deprecated public static String toString(byte[] input) { return new String(input); } @@ -788,6 +790,7 @@ public class IO { * @throws IOException if an I/O error occurs (never occurs) * @deprecated Use {@link String#String(byte[], String)} */ + @Deprecated public static String toString(byte[] input, String encoding) throws IOException { if (encoding == null) { return new String(input); diff --git a/src/main/java/com/volmit/iris/util/json/JSONArray.java b/src/main/java/com/volmit/iris/util/json/JSONArray.java index 9fff59f9f..170f9c547 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONArray.java +++ b/src/main/java/com/volmit/iris/util/json/JSONArray.java @@ -697,7 +697,7 @@ public class JSONArray implements Iterable { * @throws JSONException if the value is not finite. */ public JSONArray put(double value) throws JSONException { - Double d = new Double(value); + Double d = Double.valueOf(value); JSONObject.testValidity(d); this.put(d); return this; @@ -710,7 +710,7 @@ public class JSONArray implements Iterable { * @return this. */ public JSONArray put(int value) { - this.put(new Integer(value)); + this.put(Integer.valueOf(value)); return this; } @@ -721,7 +721,7 @@ public class JSONArray implements Iterable { * @return this. */ public JSONArray put(long value) { - this.put(new Long(value)); + this.put(Long.valueOf(value)); return this; } @@ -790,7 +790,7 @@ public class JSONArray implements Iterable { * @throws JSONException If the index is negative or if the value is not finite. */ public JSONArray put(int index, double value) throws JSONException { - this.put(index, new Double(value)); + this.put(index, Double.valueOf(value)); return this; } @@ -805,7 +805,7 @@ public class JSONArray implements Iterable { * @throws JSONException If the index is negative. */ public JSONArray put(int index, int value) throws JSONException { - this.put(index, new Integer(value)); + this.put(index, Integer.valueOf(value)); return this; } @@ -820,7 +820,7 @@ public class JSONArray implements Iterable { * @throws JSONException If the index is negative. */ public JSONArray put(int index, long value) throws JSONException { - this.put(index, new Long(value)); + this.put(index, Long.valueOf(value)); return this; } diff --git a/src/main/java/com/volmit/iris/util/json/JSONObject.java b/src/main/java/com/volmit/iris/util/json/JSONObject.java index 9d4501245..440a36a28 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONObject.java +++ b/src/main/java/com/volmit/iris/util/json/JSONObject.java @@ -1115,7 +1115,7 @@ public class JSONObject { * @throws JSONException If the key is null or if the number is invalid. */ public JSONObject put(String key, double value) throws JSONException { - this.put(key, new Double(value)); + this.put(key, Double.valueOf(value)); return this; } @@ -1128,7 +1128,7 @@ public class JSONObject { * @throws JSONException If the key is null. */ public JSONObject put(String key, int value) throws JSONException { - this.put(key, new Integer(value)); + this.put(key, Integer.valueOf(value)); return this; } @@ -1141,7 +1141,7 @@ public class JSONObject { * @throws JSONException If the key is null. */ public JSONObject put(String key, long value) throws JSONException { - this.put(key, new Long(value)); + this.put(key, Long.valueOf(value)); return this; } @@ -1389,7 +1389,7 @@ public class JSONObject { return d; } } else { - Long myLong = new Long(string); + Long myLong = Long.valueOf(string); if (string.equals(myLong.toString())) { if (myLong == myLong.intValue()) { return myLong.intValue(); diff --git a/src/main/java/com/volmit/iris/util/json/JSONWriter.java b/src/main/java/com/volmit/iris/util/json/JSONWriter.java index e359c3854..b45cceb46 100644 --- a/src/main/java/com/volmit/iris/util/json/JSONWriter.java +++ b/src/main/java/com/volmit/iris/util/json/JSONWriter.java @@ -301,7 +301,7 @@ public class JSONWriter { * @throws JSONException If the number is not finite. */ public JSONWriter value(double d) throws JSONException { - return this.value(new Double(d)); + return this.value(Double.valueOf(d)); } /** diff --git a/src/main/java/com/volmit/iris/util/json/XML.java b/src/main/java/com/volmit/iris/util/json/XML.java index 8b4b057cc..50be36dc8 100644 --- a/src/main/java/com/volmit/iris/util/json/XML.java +++ b/src/main/java/com/volmit/iris/util/json/XML.java @@ -318,7 +318,7 @@ public class XML { try { char initial = string.charAt(0); if (initial == '-' || (initial >= '0' && initial <= '9')) { - Long value = new Long(string); + Long value = Long.valueOf(string); if (value.toString().equals(string)) { return value; } @@ -326,7 +326,7 @@ public class XML { } catch (Exception ignore) { Iris.reportError(ignore); try { - Double value = new Double(string); + Double value = Double.valueOf(string); if (value.toString().equals(string)) { return value; } diff --git a/src/main/java/com/volmit/iris/util/math/Tuple3d.java b/src/main/java/com/volmit/iris/util/math/Tuple3d.java index e3c4456fa..3138e1d7c 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple3d.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple3d.java @@ -288,6 +288,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use scaleAdd(double,Tuple3d) instead */ + @Deprecated public final void scaleAdd(double s, Tuple3f t1) { scaleAdd(s, new Point3d(t1)); } @@ -402,6 +403,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use clamp(double,double,Tuple3d) instead */ + @Deprecated public final void clamp(float min, float max, Tuple3d t) { clamp(min, (double) max, t); } @@ -434,6 +436,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMin(double,Tuple3d) instead */ + @Deprecated public final void clampMin(float min, Tuple3d t) { clampMin((double) min, t); } @@ -459,6 +462,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMax(double,Tuple3d) instead */ + @Deprecated public final void clampMax(float max, Tuple3d t) { clampMax((double) max, t); } @@ -498,6 +502,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use clamp(double,double) instead */ + @Deprecated public final void clamp(float min, float max) { clamp(min, (double) max); } @@ -534,6 +539,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMin(double) instead */ + @Deprecated public final void clampMin(float min) { clampMin((double) min); } @@ -548,13 +554,13 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { if (x < min) x = min; if (y < min) y = min; if (z < min) z = min; - } /** * @deprecated Use clampMax(double) instead */ + @Deprecated public final void clampMax(float max) { clampMax((double) max); } @@ -585,6 +591,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use interpolate(Tuple3d,Tuple3d,double) instead */ + @Deprecated public final void interpolate(Tuple3d t1, Tuple3d t2, float alpha) { interpolate(t1, t2, (double) alpha); } @@ -608,6 +615,7 @@ public abstract class Tuple3d implements java.io.Serializable, Cloneable { /** * @deprecated Use interpolate(Tuple3d,double) instead */ + @Deprecated public final void interpolate(Tuple3d t1, float alpha) { interpolate(t1, (double) alpha); } diff --git a/src/main/java/com/volmit/iris/util/math/Tuple4d.java b/src/main/java/com/volmit/iris/util/math/Tuple4d.java index 437f85689..16d288205 100644 --- a/src/main/java/com/volmit/iris/util/math/Tuple4d.java +++ b/src/main/java/com/volmit/iris/util/math/Tuple4d.java @@ -328,6 +328,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use scaleAdd(double,Tuple4d) instead */ + @Deprecated public final void scaleAdd(float s, Tuple4d t1) { scaleAdd((double) s, t1); } @@ -452,6 +453,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clamp(double,double,Tuple4d) instead */ + @Deprecated public final void clamp(float min, float max, Tuple4d t) { clamp(min, (double) max, t); } @@ -488,6 +490,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMin(double,Tuple4d) instead */ + @Deprecated public final void clampMin(float min, Tuple4d t) { clampMin((double) min, t); } @@ -515,6 +518,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMax(double,Tuple4d) instead */ + @Deprecated public final void clampMax(float max, Tuple4d t) { clampMax((double) max, t); } @@ -561,6 +565,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clamp(double,double) instead */ + @Deprecated public final void clamp(float min, float max) { clamp(min, (double) max); } @@ -603,6 +608,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMin(double) instead */ + @Deprecated public final void clampMin(float min) { clampMin((double) min); } @@ -624,6 +630,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use clampMax(double) instead */ + @Deprecated public final void clampMax(float max) { clampMax((double) max); } @@ -658,6 +665,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use interpolate(Tuple4d,Tuple4d,double) instead */ + @Deprecated public void interpolate(Tuple4d t1, Tuple4d t2, float alpha) { interpolate(t1, t2, (double) alpha); } @@ -682,6 +690,7 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable { /** * @deprecated Use interpolate(Tuple4d,double) instead */ + @Deprecated public void interpolate(Tuple4d t1, float alpha) { interpolate(t1, (double) alpha); }