That's a good question. At first I was thinking no because this is a pretty 
basic change in the return values from this... but it is probably a pretty safe 
enhancement and may fix some issues...

Anyone else have thoughts on this?

-David


Jacques Le Roux wrote:
Should we not merge this in release ?

Jacques

De : <[EMAIL PROTECTED]>
Author: jonesde
Date: Mon Sep 17 19:09:09 2007
New Revision: 576660

URL: http://svn.apache.org/viewvc?rev=576660&view=rev
Log:
Changed to use BigDecimal.valueOf instead of constructor, for something closer 
to the expected results; thanks to Jacopo and
Martin Anderson for comments on this
Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=576660&r1=576659&r2=576660&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java 
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Mon 
Sep 17 19:09:09 2007
@@ -588,9 +588,9 @@
         // NOTE: for things to generally work properly BigDecimal should 
really be used as the java-type in the field type def
XML files
         Object value = get(name);
         if (value instanceof Double) {
-            return new BigDecimal(((Double) value).doubleValue());
+            return BigDecimal.valueOf(((Double) value).doubleValue());
         } else {
-            return (BigDecimal) get(name);
+            return (BigDecimal) value;
         }
     }




Reply via email to