[jira] [Commented] (OFBIZ-10051) Fixing potential Nullpointer in ContentWorker.checkConditions()

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

[jira] [Commented] (OFBIZ-10051) Fixing potential Nullpointer in ContentWorker.checkConditions()

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16296766#comment-16296766 ]

Dennis Balkir commented on OFBIZ-10051:
---------------------------------------

Hi [~deepak.dixit]

there were no formatting changes done in this patch-file. All I did, was that I took the parts of the code, that had to be checked against null and put them into a null-checking if-block. This if block, which is new, had to contain the old one, because there were parts, where content didn't should be null and the null-check was necessary for this part too. The old if-block is now one indentation-level deeper, but that was unavoidable, because all of the done code should only be done, it content is not null.

I hope that clears it up a bit :)

> Fixing potential Nullpointer in ContentWorker.checkConditions()
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-10051
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10051
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>         Attachments: OFBIZ-10051_checkConditions.patch
>
>
> This potential Nullpointer was found while fixing find-bugs-errors in the file {{ContentWorker.java}}.
> The method {{checkConditions}} is missing a proper null-check for the variable {{content}}, which is used frequently in it.
> At some point though it might be possible for {{content}} to be null and this would cause multiple {{NullpointerException}} to be thrown.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)