Re: svn commit: r778302 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java

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

Re: svn commit: r778302 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java

hans_bakker
it seems that in the statement below  0.00 is not the same as 0
(the scale is different)

in the top of InvoiceServices.java is a nice story about this.

not sure if using "equals" here is a good idea with BigDecimals,
"compare" seems to be better.

Regards,
Hans


On Mon, 2009-05-25 at 06:20 +0000, [hidden email] wrote:

> +            if (estimatedShipCost.equals(ZERO)) {

--
Antwebsystems.com: Quality OFBiz services for competitive rates

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r778302 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java

Vikas Mayur-3
Hans, You are absolutely correct.

I have indeed made the changes in rev. 778351, though this file itself  
have enough example but the explanation in InvoiceServices is wonderful.

Vikas

On May 25, 2009, at 12:24 PM, Hans Bakker wrote:

> it seems that in the statement below  0.00 is not the same as 0
> (the scale is different)
>
> in the top of InvoiceServices.java is a nice story about this.
>
> not sure if using "equals" here is a good idea with BigDecimals,
> "compare" seems to be better.
>
> Regards,
> Hans
>
>
> On Mon, 2009-05-25 at 06:20 +0000, [hidden email] wrote:
>
>> +            if (estimatedShipCost.equals(ZERO)) {
>
> --
> Antwebsystems.com: Quality OFBiz services for competitive rates
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r778302 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java

Scott Gray-2
Good catch Hans, I had a search and fixed any other usage of  
BigDecimal.equals() in r778358

Regards
Scott

On 25/05/2009, at 8:41 PM, Vikas Mayur wrote:

> Hans, You are absolutely correct.
>
> I have indeed made the changes in rev. 778351, though this file  
> itself have enough example but the explanation in InvoiceServices is  
> wonderful.
>
> Vikas
>
> On May 25, 2009, at 12:24 PM, Hans Bakker wrote:
>
>> it seems that in the statement below  0.00 is not the same as 0
>> (the scale is different)
>>
>> in the top of InvoiceServices.java is a nice story about this.
>>
>> not sure if using "equals" here is a good idea with BigDecimals,
>> "compare" seems to be better.
>>
>> Regards,
>> Hans
>>
>>
>> On Mon, 2009-05-25 at 06:20 +0000, [hidden email] wrote:
>>
>>> +            if (estimatedShipCost.equals(ZERO)) {
>>
>> --
>> Antwebsystems.com: Quality OFBiz services for competitive rates
>>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r778302 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java

hans_bakker
woow Scott! excellent quick move...Thanks!


On Mon, 2009-05-25 at 21:01 +1200, Scott Gray wrote:

> Good catch Hans, I had a search and fixed any other usage of  
> BigDecimal.equals() in r778358
>
> Regards
> Scott
>
> On 25/05/2009, at 8:41 PM, Vikas Mayur wrote:
>
> > Hans, You are absolutely correct.
> >
> > I have indeed made the changes in rev. 778351, though this file  
> > itself have enough example but the explanation in InvoiceServices is  
> > wonderful.
> >
> > Vikas
> >
> > On May 25, 2009, at 12:24 PM, Hans Bakker wrote:
> >
> >> it seems that in the statement below  0.00 is not the same as 0
> >> (the scale is different)
> >>
> >> in the top of InvoiceServices.java is a nice story about this.
> >>
> >> not sure if using "equals" here is a good idea with BigDecimals,
> >> "compare" seems to be better.
> >>
> >> Regards,
> >> Hans
> >>
> >>
> >> On Mon, 2009-05-25 at 06:20 +0000, [hidden email] wrote:
> >>
> >>> +            if (estimatedShipCost.equals(ZERO)) {
> >>
> >> --
> >> Antwebsystems.com: Quality OFBiz services for competitive rates
> >>
> >
>
--
Antwebsystems.com: Quality OFBiz services for competitive rates