You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2007/09/18 10:27:06 UTC
Re: svn commit: r576660 -
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
Should we not merge this in release ?
Jacques
De : <jo...@apache.org>
> 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;
> }
> }
>
>
>
Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
Posted by Jacopo Cappellato <ti...@sastau.it>.
I think that we should backport this to the release.
Jacopo
David E Jones wrote:
>
> 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 : <jo...@apache.org>
>>> 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;
>>> }
>>> }
>>>
>>>
>>>
>>
Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
Posted by David E Jones <jo...@hotwaxmedia.com>.
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 : <jo...@apache.org>
>> 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;
>> }
>> }
>>
>>
>>
>