You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/05/11 17:19:44 UTC
svn commit: r773599 - in /myfaces/trinidad/branches/1.2.11.1-branch: ./
trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/
trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
trinidad-sandbox/s...
Author: arobinson74
Date: Mon May 11 15:19:43 2009
New Revision: 773599
URL: http://svn.apache.org/viewvc?rev=773599&view=rev
Log:
TRINIDAD-1357
Prevent null pointer exception in the row key set if the model has not been set on the collection yet
Modified:
myfaces/trinidad/branches/1.2.11.1-branch/ (props changed)
myfaces/trinidad/branches/1.2.11.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java
myfaces/trinidad/branches/1.2.11.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/ (props changed)
myfaces/trinidad/branches/1.2.11.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/ (props changed)
Propchange: myfaces/trinidad/branches/1.2.11.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 11 15:19:43 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch:697924,699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402:745675
-/myfaces/trinidad/trunk:745151,755794
+/myfaces/trinidad/trunk:745151,755794,773079
Modified: myfaces/trinidad/branches/1.2.11.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java?rev=773599&r1=773598&r2=773599&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java (original)
+++ myfaces/trinidad/branches/1.2.11.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java Mon May 11 15:19:43 2009
@@ -34,6 +34,7 @@
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+
/**
* Implements a collection of rowKeys from a TreeModel.
* The methods on this class are optimized such that it is possible
@@ -59,7 +60,7 @@
{
_root = new Node<Object>(addAll);
}
-
+
/**
* Tests to see if the given rowKey is included in this Set.
* @return true If the rowKey is included in this Set.
@@ -69,7 +70,7 @@
{
return _isContained(rowKey);
}
-
+
/**
* @deprecated do not use. this will be removed post Tier 1.
*/
@@ -647,6 +648,10 @@
if (rowkey != null)
{
TreeModel model = getCollectionModel();
+ if (model == null)
+ {
+ return notFound(current, rowkey);
+ }
List<Object> parentkeys = model.getAllAncestorContainerRowKeys(rowkey);
List<Object> allkeys = new ArrayList<Object>(parentkeys.size() + 1);
allkeys.addAll(parentkeys);
@@ -800,7 +805,7 @@
_currIterator = _iteratorStack.pop();
return nextKey;
}
-
+
private Object _nextEntry()
{
Object nextKey = null;
Propchange: myfaces/trinidad/branches/1.2.11.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 11 15:19:43 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794,773079
Propchange: myfaces/trinidad/branches/1.2.11.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 11 15:19:43 2009
@@ -1,3 +1,3 @@
/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:699406,699496
/myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794,773079