[hidden email] 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 |
Administrator
|
Oops, sorry Christian indeed I did not tested in 1.4 :(
I revert right now Jacques De : "Christian Geisert" <[hidden email]> > [hidden email] 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: > > ============================================================================== > > --- 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 > |
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" <[hidden email]> >> [hidden email] 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 >> > |
Administrator
|
Yes thanks David
Jacques De : "David E Jones" <[hidden email]> > > 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" <[hidden email]> > >> [hidden email] 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: > > > >>> ============================================================================== > >>> --- 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 > >> > > > |
Free forum by Nabble | Edit this page |