You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Dimitri Unruh (JIRA)" <ji...@apache.org> on 2011/09/08 15:40:08 UTC
[jira] [Created] (OFBIZ-4399) Possible null pointer exception
Possible null pointer exception
-------------------------------
Key: OFBIZ-4399
URL: https://issues.apache.org/jira/browse/OFBIZ-4399
Project: OFBiz
Issue Type: Bug
Components: framework
Reporter: Dimitri Unruh
Priority: Minor
Attachments: OFBIZ-4399.patch
Hi everybody,
in UtilCache.getNextDefaultIndex(String cacheName) the return value the curInd object is dereferenced without a null check.
This may lead to a NullPointerException when the code is executed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OFBIZ-4399) Possible null pointer exception
Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-4399.
----------------------------------
Resolution: Not A Problem
Assignee: Adrian Crum
I agree with Adrian, putIfAbsent would throw a NullPointerException.
BTW, another if w/out braces in putIfAbsent :p
> Possible null pointer exception
> -------------------------------
>
> Key: OFBIZ-4399
> URL: https://issues.apache.org/jira/browse/OFBIZ-4399
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Dimitri Unruh
> Assignee: Adrian Crum
> Priority: Minor
> Attachments: OFBIZ-4399.patch
>
>
> Hi everybody,
> in UtilCache.getNextDefaultIndex(String cacheName) the return value the curInd object is dereferenced without a null check.
> This may lead to a NullPointerException when the code is executed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OFBIZ-4399) Possible null pointer exception
Posted by "Dimitri Unruh (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100524#comment-13100524 ]
Dimitri Unruh commented on OFBIZ-4399:
--------------------------------------
Adrian,
maybe you are right. For me it is just a "code styling" question.
So fell free to close it :)
> Possible null pointer exception
> -------------------------------
>
> Key: OFBIZ-4399
> URL: https://issues.apache.org/jira/browse/OFBIZ-4399
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Dimitri Unruh
> Priority: Minor
> Attachments: OFBIZ-4399.patch
>
>
> Hi everybody,
> in UtilCache.getNextDefaultIndex(String cacheName) the return value the curInd object is dereferenced without a null check.
> This may lead to a NullPointerException when the code is executed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OFBIZ-4399) Possible null pointer exception
Posted by "Dimitri Unruh (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dimitri Unruh updated OFBIZ-4399:
---------------------------------
Attachment: OFBIZ-4399.patch
> Possible null pointer exception
> -------------------------------
>
> Key: OFBIZ-4399
> URL: https://issues.apache.org/jira/browse/OFBIZ-4399
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Dimitri Unruh
> Priority: Minor
> Attachments: OFBIZ-4399.patch
>
>
> Hi everybody,
> in UtilCache.getNextDefaultIndex(String cacheName) the return value the curInd object is dereferenced without a null check.
> This may lead to a NullPointerException when the code is executed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OFBIZ-4399) Possible null pointer exception
Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100423#comment-13100423 ]
Adrian Crum commented on OFBIZ-4399:
------------------------------------
It appears to me that any condition that would result in a null reference would throw an exception before the null reference is used.
> Possible null pointer exception
> -------------------------------
>
> Key: OFBIZ-4399
> URL: https://issues.apache.org/jira/browse/OFBIZ-4399
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Dimitri Unruh
> Priority: Minor
> Attachments: OFBIZ-4399.patch
>
>
> Hi everybody,
> in UtilCache.getNextDefaultIndex(String cacheName) the return value the curInd object is dereferenced without a null check.
> This may lead to a NullPointerException when the code is executed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira