Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Jacques Le Roux
Administrator
Should we not merge this in release ?

Jacques

De : <[hidden email]>
> 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 | Threaded
Open this post in threaded view
|

Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

David E Jones

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 : <[hidden email]>
>> 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 | Threaded
Open this post in threaded view
|

Re: svn commit: r576660 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Jacopo Cappellato
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 : <[hidden email]>
>>> 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;
>>>          }
>>>      }
>>>
>>>
>>>
>>