You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Christian Geisert <ch...@isu-gmbh.de> on 2007/09/21 17:33:31 UTC

Re: svn commit: r577013 - /ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java

jleroux@apache.org schrieb:
> Author: jleroux
> Date: Tue Sep 18 11:45:28 2007
> New Revision: 577013
> 
> URL: http://svn.apache.org/viewvc?rev=577013&view=rev
> Log:
> Applied fix from trunk for revision: 576660
> 
> Modified:
>     ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> 
> Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=577013&r1=577012&r2=577013&view=diff
> ==============================================================================
> --- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
> +++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java Tue Sep 18 11:45:28 2007
> @@ -588,9 +588,9 @@
>          // NOTE: for this to be used properly it 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());

This doesn't compile with jdk 1.4 :-(

The original proposed patch seems to work:
http://www.nabble.com/Change-BigDecimal-constructor-in-GenericEntity-tf4467074.html

-- 
Christian

Re: svn commit: r577013 - /ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes thanks David

Jacques

De : "David E Jones" <jo...@hotwaxmedia.com>
>
> A better solution than reverting would be to change it to use the toString method, which is less efficient, but at least works in
1.4...
>
> If you'd like me to do that Jacques just say the word, won't take long.
>
> -David
>
>
> Jacques Le Roux wrote:
> > Oops, sorry Christian indeed I did not tested in 1.4 :(
> >
> > I revert right now
> >
> > Jacques
> >
> > De : "Christian Geisert" <ch...@isu-gmbh.de>
> >> jleroux@apache.org schrieb:
> >>> Author: jleroux
> >>> Date: Tue Sep 18 11:45:28 2007
> >>> New Revision: 577013
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=577013&view=rev
> >>> Log:
> >>> Applied fix from trunk for revision: 576660
> >>>
> >>> Modified:
> >>>     ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> >>>
> >>> Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> >>> URL:
> >
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=577013&r1=577012&r2=577013&view=diff
> >>> ==============================================================================
> >>> --- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
> >>> +++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java Tue Sep 18 11:45:28 2007
> >>> @@ -588,9 +588,9 @@
> >>>          // NOTE: for this to be used properly it 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());
> >> This doesn't compile with jdk 1.4 :-(
> >>
> >> The original proposed patch seems to work:
> >> http://www.nabble.com/Change-BigDecimal-constructor-in-GenericEntity-tf4467074.html
> >>
> >> -- 
> >> Christian
> >>
> >
>


Re: svn commit: r577013 - /ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Posted by David E Jones <jo...@hotwaxmedia.com>.
A better solution than reverting would be to change it to use the toString method, which is less efficient, but at least works in 1.4...

If you'd like me to do that Jacques just say the word, won't take long.

-David


Jacques Le Roux wrote:
> Oops, sorry Christian indeed I did not tested in 1.4 :(
> 
> I revert right now
> 
> Jacques
> 
> De : "Christian Geisert" <ch...@isu-gmbh.de>
>> jleroux@apache.org schrieb:
>>> Author: jleroux
>>> Date: Tue Sep 18 11:45:28 2007
>>> New Revision: 577013
>>>
>>> URL: http://svn.apache.org/viewvc?rev=577013&view=rev
>>> Log:
>>> Applied fix from trunk for revision: 576660
>>>
>>> Modified:
>>>     ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
>>>
>>> Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
>>> URL:
> http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=577013&r1=577012&r2=577013&view=diff
>>> ==============================================================================
>>> --- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
>>> +++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java Tue Sep 18 11:45:28 2007
>>> @@ -588,9 +588,9 @@
>>>          // NOTE: for this to be used properly it 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());
>> This doesn't compile with jdk 1.4 :-(
>>
>> The original proposed patch seems to work:
>> http://www.nabble.com/Change-BigDecimal-constructor-in-GenericEntity-tf4467074.html
>>
>> -- 
>> Christian
>>
> 

Re: svn commit: r577013 - /ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Oops, sorry Christian indeed I did not tested in 1.4 :(

I revert right now

Jacques

De : "Christian Geisert" <ch...@isu-gmbh.de>
> jleroux@apache.org schrieb:
> > Author: jleroux
> > Date: Tue Sep 18 11:45:28 2007
> > New Revision: 577013
> >
> > URL: http://svn.apache.org/viewvc?rev=577013&view=rev
> > Log:
> > Applied fix from trunk for revision: 576660
> >
> > Modified:
> >     ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> >
> > Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java
> > URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=577013&r1=577012&r2=577013&view=diff
> > ==============================================================================
> > --- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
> > +++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/GenericEntity.java Tue Sep 18 11:45:28 2007
> > @@ -588,9 +588,9 @@
> >          // NOTE: for this to be used properly it 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());
>
> This doesn't compile with jdk 1.4 :-(
>
> The original proposed patch seems to work:
> http://www.nabble.com/Change-BigDecimal-constructor-in-GenericEntity-tf4467074.html
>
> -- 
> Christian
>