commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r754805 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java
Date Mon, 16 Mar 2009 02:08:49 GMT
Author: sebb
Date: Mon Mar 16 02:08:49 2009
New Revision: 754805

URL: http://svn.apache.org/viewvc?rev=754805&view=rev
Log:
Byte.valueOf() is definitely faster than new Byte()

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java?rev=754805&r1=754804&r2=754805&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java Mon Mar
16 02:08:49 2009
@@ -56,11 +56,11 @@
     /** Reusable Short constant for minus one. */
     public static final Short SHORT_MINUS_ONE = new Short((short) -1);
     /** Reusable Byte constant for zero. */
-    public static final Byte BYTE_ZERO = new Byte((byte) 0);
+    public static final Byte BYTE_ZERO = Byte.valueOf((byte) 0);
     /** Reusable Byte constant for one. */
-    public static final Byte BYTE_ONE = new Byte((byte) 1);
+    public static final Byte BYTE_ONE = Byte.valueOf((byte) 1);
     /** Reusable Byte constant for minus one. */
-    public static final Byte BYTE_MINUS_ONE = new Byte((byte) -1);
+    public static final Byte BYTE_MINUS_ONE = Byte.valueOf((byte) -1);
     /** Reusable Double constant for zero. */
     public static final Double DOUBLE_ZERO = new Double(0.0d);
     /** Reusable Double constant for one. */



Mime
View raw message