Author: lukaszlenart Date: Tue Jan 8 07:23:43 2013 New Revision: 1430153 URL: http://svn.apache.org/viewvc?rev=1430153&view=rev Log: Uses already available constants instead of redeclaring them
Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericDefaults.java commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/PrimitiveDefaults.java Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericDefaults.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericDefaults.java?rev=1430153&r1=1430152&r2=1430153&view=diff ============================================================================== --- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericDefaults.java (original) +++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericDefaults.java Tue Jan 8 07:23:43 2013 @@ -40,8 +40,8 @@ class NumericDefaults { NUMERIC_DEFAULTS.put( Float.class, 0.0f ); NUMERIC_DEFAULTS.put( Double.class, 0.0 ); - NUMERIC_DEFAULTS.put( BigInteger.class, new BigInteger( "0" ) ); - NUMERIC_DEFAULTS.put( BigDecimal.class, new BigDecimal( 0.0 ) ); + NUMERIC_DEFAULTS.put( BigInteger.class, BigInteger.ZERO ); + NUMERIC_DEFAULTS.put( BigDecimal.class, BigDecimal.ZERO ); } Object get( Class<?> cls ) { Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/PrimitiveDefaults.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/PrimitiveDefaults.java?rev=1430153&r1=1430152&r2=1430153&view=diff ============================================================================== --- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/PrimitiveDefaults.java (original) +++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/PrimitiveDefaults.java Tue Jan 8 07:23:43 2013 @@ -43,8 +43,8 @@ class PrimitiveDefaults { map.put( Float.TYPE, 0.0f ); map.put( Double.TYPE, 0.0 ); - map.put( BigInteger.class, new BigInteger( "0" ) ); - map.put( BigDecimal.class, new BigDecimal( 0.0 ) ); + map.put( BigInteger.class, BigInteger.ZERO ); + map.put( BigDecimal.class, BigDecimal.ZERO ); } Object get( Class<?> cls ) {