[jira] Created: (OFBIZ-1898) FlexibleMapAccessor.java throws NPE under certain conditions

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

[jira] Created: (OFBIZ-1898) FlexibleMapAccessor.java throws NPE under certain conditions

Nicolas Malin (Jira)
FlexibleMapAccessor.java throws NPE under certain conditions
------------------------------------------------------------

                 Key: OFBIZ-1898
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1898
             Project: OFBiz
          Issue Type: Bug
          Components: framework
            Reporter: Adrian Crum


If you use a statement like

<set field="listItem" from-field="someMap.someList[0]"/>

and someMap doesn't exist, FlexibleMapAccessor.java throws a NPE at line 148.

I tried some ideas to fix it, but they all broke the class. I don't know enough about it to fix it.


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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1898) FlexibleMapAccessor.java throws NPE under certain conditions

Nicolas Malin (Jira)

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

David E. Jones commented on OFBIZ-1898:
---------------------------------------

Did you try adding something like this just before that line (148):

                if (newBase == null) {
                    return null;
                }

It would treat it the same way it treats a missing list.

On a side note, what sorts of issues did you run into with other changes you made?

> FlexibleMapAccessor.java throws NPE under certain conditions
> ------------------------------------------------------------
>
>                 Key: OFBIZ-1898
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1898
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>            Reporter: Adrian Crum
>
> If you use a statement like
> <set field="listItem" from-field="someMap.someList[0]"/>
> and someMap doesn't exist, FlexibleMapAccessor.java throws a NPE at line 148.
> I tried some ideas to fix it, but they all broke the class. I don't know enough about it to fix it.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1898) FlexibleMapAccessor.java throws NPE under certain conditions

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum closed OFBIZ-1898.
------------------------------

    Resolution: Won't Fix

This has been made invalid by the recent refactoring.

> FlexibleMapAccessor.java throws NPE under certain conditions
> ------------------------------------------------------------
>
>                 Key: OFBIZ-1898
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1898
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>            Reporter: Adrian Crum
>
> If you use a statement like
> <set field="listItem" from-field="someMap.someList[0]"/>
> and someMap doesn't exist, FlexibleMapAccessor.java throws a NPE at line 148.
> I tried some ideas to fix it, but they all broke the class. I don't know enough about it to fix it.

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