You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Stefan Huehner (JIRA)" <ji...@apache.org> on 2007/02/16 18:47:06 UTC

[jira] Created: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Fix some logic bugs which lead to NPE's
---------------------------------------

                 Key: OFBIZ-730
                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
    Affects Versions: SVN trunk
            Reporter: Stefan Huehner


Hi,
the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Updated: (OFBIZ-730) Fix some logic bugs which lead to NPE's

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

Stefan Huehner updated OFBIZ-730:
---------------------------------

    Attachment: ofbiz_logic1.diff

Hi,
this patch corrects several issues where:
- "&" was used instead of "&&"
- && and || where swapped in if-conditions



> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Closed: (OFBIZ-730) Fix some logic bugs which lead to NPE's

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

Jacopo Cappellato closed OFBIZ-730.
-----------------------------------

    Resolution: Fixed

Thanks Stefan,

your patch is in rev. 550233

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>            Assignee: Jacopo Cappellato
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Stefan Huehner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475157 ] 

Stefan Huehner commented on OFBIZ-730:
--------------------------------------

Si,

i agreee after looking into the UtilValidate class. But i won't have time to do this before next week. Perhaps another cleanup-task would be to explicitely look after those ==null || .size() == 0 instances and convert these.

Stefan

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Assigned: (OFBIZ-730) Fix some logic bugs which lead to NPE's

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

Si Chen reassigned OFBIZ-730:
-----------------------------

    Assignee: Si Chen

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Updated: (OFBIZ-730) Fix some logic bugs which lead to NPE's

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

Stefan Huehner updated OFBIZ-730:
---------------------------------

    Attachment: ofbiz_null1.diff

Hi,
attached patch fixes an issue where a map will be used whithout contructing it first.

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474806 ] 

Si Chen commented on OFBIZ-730:
-------------------------------

Stefan,

I committed the ofbiz_null1.diff in r 510172.  The other file I'd like you to go back and review it again.  Many of these conditions are actually better implemented to use the OFBIZ UtilValidate.isEmpty(...) method than to do these outright null and .size() == 0 comparisons.

Si

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473773 ] 

Si Chen commented on OFBIZ-730:
-------------------------------

Much appreciated.  

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Stefan Huehner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475646 ] 

Stefan Huehner commented on OFBIZ-730:
--------------------------------------

Si,

is it ok to replace all occurrences of these checks will callc to UtilValidate? Or only theses which are used for input validation (as its the usage of UtilValidate as stated by its class comment)?

Stefan


> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Stefan Huehner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477645 ] 

Stefan Huehner commented on OFBIZ-730:
--------------------------------------

If opened a second issue for the conversion of such hardcoded isEmpty checks: OFBIZ-770.
As this other issue possibly converts many more places (without fixing logic bugs) perhaps we should consider committing this bug-fixing patch independently to fix the this errors here and keep the to tasks seperate.


> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Commented: (OFBIZ-730) Fix some logic bugs which lead to NPE's

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476457 ] 

Si Chen commented on OFBIZ-730:
-------------------------------

It seems to me that all of them can be replaced by UtilValidate.isEmpty, but take a look at the methods in UtilValidate yourself and see if you find any issues with using it.

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>         Assigned To: Si Chen
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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


[jira] Assigned: (OFBIZ-730) Fix some logic bugs which lead to NPE's

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

Jacopo Cappellato reassigned OFBIZ-730:
---------------------------------------

    Assignee: Jacopo Cappellato  (was: Si Chen)

> Fix some logic bugs which lead to NPE's
> ---------------------------------------
>
>                 Key: OFBIZ-730
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-730
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Stefan Huehner
>            Assignee: Jacopo Cappellato
>         Attachments: ofbiz_logic1.diff, ofbiz_null1.diff
>
>
> Hi,
> the attached patch fixes several logic bugs which can/will lead to NullPointerExceptions.

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