incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romanst...@apache.org
Subject svn commit: r931096 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java
Date Tue, 06 Apr 2010 11:34:50 GMT
Author: romanstumm
Date: Tue Apr  6 11:34:50 2010
New Revision: 931096

URL: http://svn.apache.org/viewvc?rev=931096&view=rev
Log:
BVAl-17 merged patch for "PathImpl keeps a null-named first node on unindexed property paths"

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java?rev=931096&r1=931095&r2=931096&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/util/PathImpl.java
Tue Apr  6 11:34:50 2010
@@ -106,7 +106,12 @@ public class PathImpl implements Path, S
     }
 
     public void addNode(Node node) {
-        nodeList.add(node);
+    	if ( isRootPath() && nodeList.get(0).getIndex() == null ) {
+    		nodeList.set(0, node);
+    	}
+    	else {
+    		nodeList.add(node);
+    	}
     }
 
     public Node removeLeafNode() {



Mime
View raw message