Jacopo,

In this article, it's about canonical representation ? Could you be more 
precise please ?

So this mean that BigDecimal will be used as java-type in entitymodel.xml files 
(and in most places will replace Double) ?

Does this mean that "Double/BigDecimal issues are all resolved" ? If yes, then 
+1 ... (I saw that 2 issues are still pending after
Scoot recent work)

Jacques

De : "Jacopo Cappellato" <[EMAIL PROTECTED]>
> What do you think about the attached patch?
> I really think it should be committed to the trunk, especially after
> reading the following notes:
>
> http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(double)
>
> However, I'd like to get feedback from you before committing it since it
> is a low level change.
>
> Jacopo
>
> PS: thanks to Martin Anderson from the patch and research around it.
>


--------------------------------------------------------------------------------


> Index: framework/entity/src/org/ofbiz/entity/GenericEntity.java
> ===================================================================
> --- framework/entity/src/org/ofbiz/entity/GenericEntity.java (revisione 
> 576353)
> +++ framework/entity/src/org/ofbiz/entity/GenericEntity.java (copia locale)
> @@ -588,7 +588,7 @@
>          // 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 new BigDecimal(((Double) value).toString());
>          } else {
>              return (BigDecimal) get(name);
>          }
>

Reply via email to