You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Amit Sharma (JIRA)" <ji...@apache.org> on 2010/02/15 13:13:28 UTC

[jira] Created: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Compares the specified object with this cart item is not in the right way.
--------------------------------------------------------------------------

                 Key: OFBIZ-3478
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
             Project: OFBiz
          Issue Type: Bug
          Components: order
    Affects Versions: SVN trunk
            Reporter: Amit Sharma
             Fix For: SVN trunk


In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.

It should be

if (!this.reservLength.equals(reservLength)) {
   return false;
}

instead of 

if (this.reservLength != reservLength) {
   return false;
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Amit Sharma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amit Sharma updated OFBIZ-3478:
-------------------------------

    Attachment: OFBIZ-3478.patch

Here is the patch for the same.

Regards,

-Amit Sharma

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Scott Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834080#action_12834080 ] 

Scott Gray commented on OFBIZ-3478:
-----------------------------------

Sounds good to me, thanks Amit

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Scott Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834057#action_12834057 ] 

Scott Gray commented on OFBIZ-3478:
-----------------------------------

Your patch is also not the right way to compare BigDecimals, it should be:
{code}
if (bigDecimal1.compareTo(bigDecimal2) != 0) {
{code}

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Amit Sharma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amit Sharma updated OFBIZ-3478:
-------------------------------

    Attachment: OFBIZ-3478.patch

Here is updated patch.

Thanks & Regards,
-Amit Sharma

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch, OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Amit Sharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834079#action_12834079 ] 

Amit Sharma commented on OFBIZ-3478:
------------------------------------

Thanks Scott for your comment.

As the this.reservLength is initializing to BigDecimal.ZERO and reservLength is passed in the method and might be null so the appropriate check for this should be 

{code}

if (bigDecimal2 != null && bigDecimal1.compareTo(bigDecimal2) != 0) {

{code}

Please let me know your thought.

-Amit Sharma

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya reassigned OFBIZ-3478:
------------------------------------------

    Assignee: Ashish Vijaywargiya

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>            Assignee: Ashish Vijaywargiya
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch, OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-3478) Compares the specified object with this cart item is not in the right way.

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya closed OFBIZ-3478.
--------------------------------------

    Resolution: Fixed

Thanks Amit for the contribution - Done at r910513.

--
Ashish Vijaywargiya

> Compares the specified object with this cart item is not in the right way.
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-3478
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3478
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Amit Sharma
>            Assignee: Ashish Vijaywargiya
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3478.patch, OFBIZ-3478.patch
>
>
> In ShoppingCartItem.java compares of the specified object with this cart item is not in the right way.
> It should be
> if (!this.reservLength.equals(reservLength)) {
>    return false;
> }
> instead of 
> if (this.reservLength != reservLength) {
>    return false;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.