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.

Reply via email to