[dna-commits] DNA SVN: r1104 - trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Mon Jul 13 09:31:28 EDT 2009


Author: bcarothers
Date: 2009-07-13 09:31:28 -0400 (Mon, 13 Jul 2009)
New Revision: 1104

Modified:
   trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java
Log:
DNA-490 JPA Connector Does Not Always Compute SNS Indices Correctly

Committed patch that corrects the off-by-one error with the knowledge that child index (as opposed to SNS index) is 0-based.

Modified: trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java	2009-07-13 13:09:05 UTC (rev 1103)
+++ trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java	2009-07-13 13:31:28 UTC (rev 1104)
@@ -345,7 +345,7 @@
                 // The cache had the complete list of children for the parent node, which means
                 // we know about all of the children and can walk the children to figure out the next indexes.
                 nextIndexInParent = childrenOfParent.size();
-                if (nextIndexInParent > 1) {
+                if (nextIndexInParent > 0) {
                     // Since we want the last indexes, process the list backwards ...
                     ListIterator<Location> iter = childrenOfParent.listIterator(childrenOfParent.size());
                     while (iter.hasPrevious()) {
@@ -2548,7 +2548,7 @@
 
     protected class LargeValueSerializer implements LargeValues {
         private final PropertiesEntity properties;
-        private Set<String> written;
+        private final Set<String> written;
 
         public LargeValueSerializer( PropertiesEntity entity ) {
             this.properties = entity;




More information about the dna-commits mailing list