[
https://issues.apache.org/jira/browse/TRINIDAD-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660499#action_12660499
]
Andrew Robinson commented on TRINIDAD-1286:
-------------------------------------------
How did you get into a state where the collection model is null? This is set no
in the getter of the FacesBean. So the only way I would see this happening is
if some state is invalid in your app. Could you please submit a maven test case
to reproduce the issue or a way to reproduce the problem with the demo app?
> RowKeySetTreeImpl.toString() should be more defensive to avoid null pointer
> exceptions
> --------------------------------------------------------------------------------------
>
> Key: TRINIDAD-1286
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1286
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 1.2.9-core
> Reporter: Max Starets
>
> RowKeySetTreeImpl inherits toString() implementation from AbstractCollection.
> AbstractCollection.toString() is calling iterator(), which is causing a null
> pointer exception when the collection model is null.
> The call stack is the following:
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$Search.find(RowKeySetTreeImpl.java:652)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl._isContained(RowKeySetTreeImpl.java:475)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.access$200(RowKeySetTreeImpl.java:45)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$NodeIterator._nextEntry(RowKeySetTreeImpl.java:824)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$NodeIterator.nextItem(RowKeySetTreeImpl.java:800)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$NodeIterator.<init>(RowKeySetTreeImpl.java:793)
> at
> org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.iterator(RowKeySetTreeImpl.java:92)
> at java.util.AbstractCollection.toString(AbstractCollection.java:414)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.