jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1197515 - in /jackrabbit/sandbox/jackrabbit-mk: ./ jackrabbit-jcr-commons/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/ jackrabbit-jcr-commons/...
Date Fri, 04 Nov 2011 11:31:44 GMT
Author: mduerig
Date: Fri Nov  4 11:31:43 2011
New Revision: 1197515

URL: http://svn.apache.org/viewvc?rev=1197515&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP): merge changes from trunk

Added:
    jackrabbit/sandbox/jackrabbit-mk/check-release.sh
      - copied unchanged from r1197487, jackrabbit/trunk/check-release.sh
Modified:
    jackrabbit/sandbox/jackrabbit-mk/   (props changed)
    jackrabbit/sandbox/jackrabbit-mk/RELEASE-NOTES.txt
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/pom.xml
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/Rank.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/Parser.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/package-info.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/JcrRemotingConstants.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ValueUtil.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/package-info.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/QueryObjectModelFactoryTest.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ItemDefinitionProviderImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-parent/pom.xml
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/pom.xml
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java

Propchange: jackrabbit/sandbox/jackrabbit-mk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  4 11:31:43 2011
@@ -1,2 +1,3 @@
+/jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1158344-1176401
+/jackrabbit/trunk:1158344-1197487

Modified: jackrabbit/sandbox/jackrabbit-mk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/RELEASE-NOTES.txt?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/RELEASE-NOTES.txt (original)
+++ jackrabbit/sandbox/jackrabbit-mk/RELEASE-NOTES.txt Fri Nov  4 11:31:43 2011
@@ -1,16 +1,70 @@
-Release Notes -- Apache Jackrabbit -- Version 2.2.0
+Release Notes -- Apache Jackrabbit -- Version 2.3.2
 
 Introduction
 ------------
 
-This is the Apache Jackrabbit 2.2.0 release. This release is a fully compliant
-implementation of the JCR 2.0 API that was specified by the Java Specification
-Request 283 (JSR 283, http://jcp.org/en/jsr/detail?id=283).
+This is Apache Jackrabbit(TM) 2.3, a fully compliant implementation of the
+Content Repository for Java(TM) Technology API, version 2.0 (JCR 2.0) as
+specified in the Java Specification Request 283 (JSR 283).
+
+Apache Jackrabbit 2.3 is an unstable series of releases cut directly from
+Jackrabbit trunk, with a focus on new features and other improvements.
+For production use we recommend the latest stable 2.2 release.
+
+Changes in Jackrabbit 2.3.2
+---------------------------
+
+New features
+
+  [JCR-3117] Stats for the PersistenceManager
+  [JCR-3124] Stats for Queries
+
+Improvements
+
+  [JCR-2989] Support for embedded index aggregates
+  [JCR-3098] Add hit miss statistics and logging to caches
+  [JCR-3107] Speed up hierarchy cache initialization
+  [JCR-3109] Move PersistenceManagerTest from o.a.j.core to o.a.j.core....
+  [JCR-3114] expose PM for versioning manager so that the consistency ...
+  [JCR-3119] Improve aggregate node indexing code
+  [JCR-3122] QueryObjectModelImpl should execute queries as SessionOperation(s)
+
+Bug fixes
+
+  [JCR-2892] - Large fetch sizes have potentially deleterious effects on ...
+  [JCR-3093] - Inconsistency between Session.getProperty and Node....
+  [JCR-3108] - SQL2 ISDESCENDANTNODE can throw BooleanQuery#...
+  [JCR-3111] - InternalVersionManagerBase; missing null check after getNode()
+  [JCR-3112] - NodeTypeDefDiff.PropDefDiff.init() constraints change check ...
+  [JCR-3115] - Versioning fixup leaves persistence in a state where the ...
+  [JCR-3126] - The CredentialsWrapper should use a empty String as userId ...
+  [JCR-3128] - Problem with formerly escaped JCR node names when upgrading ...
+
+Changes in Jackrabbit 2.3.1
+---------------------------
+
+Improvements
+
+  [JCR-3017] Version history recovery fails in case a version does not ...
+  [JCR-3030] Permit using different tablespaces for tables and indexes ...
+  [JCR-3084] Script for checking releases
+  [JCR-3085] better diagnostics when version storage is broken
+  [JCR-3091] Lucene Scorer implementations should handle the 'advance' ...
+  [JCR-3102] InternalVersion.getFrozenNode confused about root version?
+
+Bug fixes
+
+  [JCR-2774] Access control for repository level API operations
+  [JCR-3082] occasional index out of bounds exception while running ...
+  [JCR-3086] potential infinite loop around InternalVersionImpl.getSuccessors
+  [JCR-3089] javax.jcr.RepositoryException when a JOIN SQL2 query is ...
+  [JCR-3090] setFetchSize() fails in getAllNodeIds()
+  [JCR-3095] Move operation may turn AC caches stale
+  [JCR-3101] recovery tool does not recover when version history can ...
+  [JCR-3105] NPE when versioning operations are concurrent
 
-Changes in this release
------------------------
-
-TODO
+In addition to the above-mentioned changes, this release contains
+all the changes included up to the Apache Jackrabbit 2.3.0 release.
 
 For more detailed information about all the changes in this and other
 Jackrabbit releases, please see the Jackrabbit issue tracker at

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/pom.xml?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/pom.xml Fri Nov  4 11:31:43 2011
@@ -73,7 +73,7 @@
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-api</artifactId>
-      <version>2.3-SNAPSHOT</version>
+      <version>2.4-SNAPSHOT</version>
       <optional>true</optional>
     </dependency>
     <dependency>

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/JcrUtils.java Fri Nov  4 11:31:43 2011
@@ -16,20 +16,9 @@
  */
 package org.apache.jackrabbit.commons;
 
-import static java.net.URLDecoder.decode;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
+import org.apache.jackrabbit.commons.iterator.NodeIterable;
+import org.apache.jackrabbit.commons.iterator.PropertyIterable;
+import org.apache.jackrabbit.commons.iterator.RowIterable;
 
 import javax.imageio.spi.ServiceRegistry;
 import javax.jcr.Binary;
@@ -48,10 +37,20 @@ import javax.jcr.nodetype.NodeType;
 import javax.jcr.query.QueryResult;
 import javax.jcr.query.Row;
 import javax.jcr.query.RowIterator;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.StringTokenizer;
 
-import org.apache.jackrabbit.commons.iterator.NodeIterable;
-import org.apache.jackrabbit.commons.iterator.PropertyIterable;
-import org.apache.jackrabbit.commons.iterator.RowIterable;
+import static java.net.URLDecoder.decode;
 
 /**
  * Collection of static utility methods for use with the JCR API.
@@ -72,8 +71,7 @@ public class JcrUtils {
      * {@link RepositoryFactory} parameters through the
      * {@link #getRepository(Map)} method.
      */
-    public static final String REPOSITORY_URI =
-        "org.apache.jackrabbit.repository.uri";
+    public static final String REPOSITORY_URI = "org.apache.jackrabbit.repository.uri";
 
     /**
      * A pre-allocated empty array of values.
@@ -140,12 +138,12 @@ public class JcrUtils {
         if (parameters != null
                 && parameters.containsKey(JcrUtils.REPOSITORY_URI)) {
             String uri = parameters.get(JcrUtils.REPOSITORY_URI);
-            Map<String, String> copy = new HashMap<String, String>(parameters);
             try {
                 URI u = new URI(uri);
                 String query = u.getRawQuery();
                 if (query != null) {
-                    for (String entry : query.split("&")) {
+                   Map<String, String> copy = new HashMap<String, String>(parameters);
+                   for (String entry : query.split("&")) {
                         int i = entry.indexOf('=');
                         if (i != -1) {
                             copy.put(
@@ -161,16 +159,16 @@ public class JcrUtils {
                             JcrUtils.REPOSITORY_URI,
                             new URI(u.getScheme(), u.getRawAuthority(),
                                     u.getRawPath(), null, u.getRawFragment()
-                                    ).toASCIIString());
+                            ).toASCIIString());
                     parameters = copy;
                 }
             } catch (URISyntaxException e) {
                 log.append(newline);
                 log.append("Note that the given repository URI was invalid:");
                 log.append(newline);
-                log.append("        " + uri);
+                log.append("        ").append(uri);
                 log.append(newline);
-                log.append("        " + e.getMessage());
+                log.append("        ").append(e.getMessage());
             } catch (UnsupportedEncodingException e) {
                 throw new RepositoryException("UTF-8 is not supported!", e);
             }
@@ -180,7 +178,7 @@ public class JcrUtils {
         log.append(newline);
         log.append("The following RepositoryFactory classes were consulted:");
         Iterator<RepositoryFactory> iterator =
-            ServiceRegistry.lookupProviders(RepositoryFactory.class);
+                ServiceRegistry.lookupProviders(RepositoryFactory.class);
         while (iterator.hasNext()) {
             RepositoryFactory factory = iterator.next();
             log.append(newline);
@@ -209,7 +207,7 @@ public class JcrUtils {
         log.append(newline);
         log.append(
                 "Perhaps the repository you are trying"
-                + " to access is not available at the moment.");
+                        + " to access is not available at the moment.");
 
         // No matching repository found. Throw an exception with the
         // detailed information we gathered during the above process.
@@ -623,12 +621,10 @@ public class JcrUtils {
     public static Node putFile(
             Node parent, String name, String mime,
             InputStream data, Calendar date) throws RepositoryException {
-        Binary binary =
-            parent.getSession().getValueFactory().createBinary(data);
+        Binary binary = parent.getSession().getValueFactory().createBinary(data);
         try {
             Node file = getOrAddNode(parent, name, NodeType.NT_FILE);
-            Node content =
-                getOrAddNode(file, Node.JCR_CONTENT, NodeType.NT_RESOURCE);
+            Node content = getOrAddNode(file, Node.JCR_CONTENT, NodeType.NT_RESOURCE);
 
             content.setProperty(Property.JCR_MIMETYPE, mime);
             String[] parameters = mime.split(";");
@@ -743,8 +739,7 @@ public class JcrUtils {
      * @param date modified date
      * @throws RepositoryException if the last modified date can not be set
      */
-    public void setLastModified(Node node, Calendar date)
-            throws RepositoryException {
+    public void setLastModified(Node node, Calendar date) throws RepositoryException {
         if (node.hasNode(Node.JCR_CONTENT)) {
             setLastModified(node.getNode(Node.JCR_CONTENT), date);
         } else {
@@ -834,11 +829,10 @@ public class JcrUtils {
         }
     }
 
-    private static final Map<String, Integer> PROPERTY_TYPES =
-        new HashMap<String, Integer>();
+    private static final Map<String, Integer> PROPERTY_TYPES = new HashMap<String, Integer>();
 
     static {
-        for (int i = 0; i < 13; i++) {
+        for (int i = PropertyType.UNDEFINED; i <= PropertyType.DECIMAL; i++) {
             PROPERTY_TYPES.put(PropertyType.nameFromValue(i).toLowerCase(), i);
         }
     }
@@ -861,8 +855,7 @@ public class JcrUtils {
         if (type != null) {
             return type;
         } else {
-            throw new IllegalArgumentException(
-                    "Unknown property type: " + name);
+            throw new IllegalArgumentException("Unknown property type: " + name);
         }
     }
 
@@ -904,10 +897,9 @@ public class JcrUtils {
      * @throws RepositoryException in case of exception accessing the Repository
      */
     public static Node getOrCreateByPath(String absolutePath,
-                                  String intermediateNodeType,
-                                  String nodeType,
-                                  Session session,
-                                  boolean autoSave)
+                                         String intermediateNodeType,
+                                         String nodeType, Session session,
+                                         boolean autoSave)
             throws RepositoryException {
         return getOrCreateByPath(absolutePath, false, intermediateNodeType, nodeType, session, autoSave);
     }
@@ -943,7 +935,7 @@ public class JcrUtils {
      *             in case of exception accessing the Repository
      */
     public static Node getOrCreateUniqueByPath(String pathHint, String nodeType, Session session)
-           throws RepositoryException {
+            throws RepositoryException {
         return getOrCreateByPath(pathHint, true, nodeType, nodeType, session, false);
     }
 
@@ -982,11 +974,10 @@ public class JcrUtils {
      *             in case of exception accessing the Repository
      */
     public static Node getOrCreateByPath(String absolutePath,
-                                  boolean createUniqueLeaf,
-                                  String intermediateNodeType,
-                                  String nodeType,
-                                  Session session,
-                                  boolean autoSave)
+                                         boolean createUniqueLeaf,
+                                         String intermediateNodeType,
+                                         String nodeType, Session session,
+                                         boolean autoSave)
             throws RepositoryException {
         if (absolutePath == null || absolutePath.length() == 0 || "/".equals(absolutePath)) {
             // path denotes root node
@@ -1028,8 +1019,8 @@ public class JcrUtils {
      *             in case of exception accessing the Repository
      */
     public static Node getOrCreateUniqueByPath(Node parent,
-                                        String nodeNameHint,
-                                        String nodeType)
+                                               String nodeNameHint,
+                                               String nodeType)
             throws RepositoryException {
         return getOrCreateByPath(parent, nodeNameHint, true, nodeType, nodeType, false);
     }
@@ -1070,11 +1061,11 @@ public class JcrUtils {
      *             in case of exception accessing the Repository
      */
     public static Node getOrCreateByPath(Node baseNode,
-                                  String path,
-                                  boolean createUniqueLeaf,
-                                  String intermediateNodeType,
-                                  String nodeType,
-                                  boolean autoSave)
+                                         String path,
+                                         boolean createUniqueLeaf,
+                                         String intermediateNodeType,
+                                         String nodeType,
+                                         boolean autoSave)
             throws RepositoryException {
 
         if (!createUniqueLeaf && baseNode.hasNode(path)) {
@@ -1092,12 +1083,14 @@ public class JcrUtils {
                 final String token = st.nextToken();
                 if (!node.hasNode(token)) {
                     try {
-                        if ( intermediateNodeType != null ) {
+                        if (intermediateNodeType != null) {
                             node.addNode(token, intermediateNodeType);
                         } else {
                             node.addNode(token);
                         }
-                        if (autoSave) node.getSession().save();
+                        if (autoSave) {
+                            node.getSession().save();
+                        }
                     } catch (RepositoryException e) {
                         // we ignore this as this folder might be created from a different task
                         node.refresh(false);
@@ -1110,12 +1103,14 @@ public class JcrUtils {
 
         // last path element (path = leaf node name)
         if (!node.hasNode(path)) {
-            if ( nodeType != null ) {
+            if (nodeType != null) {
                 node.addNode(path, nodeType);
             } else {
                 node.addNode(path);
             }
-            if (autoSave) node.getSession().save();
+            if (autoSave) {
+                node.getSession().save();
+            }
         } else if (createUniqueLeaf) {
             // leaf node already exists, create new unique name
             String leafNodeName;
@@ -1126,12 +1121,14 @@ public class JcrUtils {
             } while (node.hasNode(leafNodeName));
 
             Node leaf;
-            if ( nodeType != null ) {
+            if (nodeType != null) {
                 leaf = node.addNode(leafNodeName, nodeType);
             } else {
                 leaf = node.addNode(leafNodeName);
             }
-            if (autoSave) node.getSession().save();
+            if (autoSave) {
+                node.getSession().save();
+            }
             return leaf;
         }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java Fri Nov  4 11:31:43 2011
@@ -210,7 +210,9 @@ public class BTreeManager implements Tre
         SizedIterator<Node> nodes = getNodes(node);
         long count = nodes.getSize();
         if (count < 0) {
-            for (count = 0; nodes.hasNext(); count++, nodes.next());
+            for (count = 0; nodes.hasNext(); count++) {
+                nodes.next();
+            }
         }
 
         if (count == 0) {
@@ -232,7 +234,9 @@ public class BTreeManager implements Tre
         SizedIterator<Property> properties = getProperties(node);
         long count = properties.getSize();
         if (count < 0) {
-            for (count = 0; properties.hasNext(); count++, properties.next());
+            for (count = 0; properties.hasNext(); count++) {
+                properties.next();
+            }
         }
 
         if (count == 0) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/Rank.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/Rank.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/Rank.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/Rank.java Fri Nov  4 11:31:43 2011
@@ -228,12 +228,19 @@ public class Rank<T> {
         // Partition values around pivot
         while (lo < hi) {
             // Find values to swap around the pivot
-            while (order.compare(values[lo], values[pivot]) < 0) lo++;
-            while (order.compare(values[hi], values[pivot]) > 0) hi--;
+            while (order.compare(values[lo], values[pivot]) < 0) {
+                lo++;
+            }
+            while (order.compare(values[hi], values[pivot]) > 0) {
+                hi--;
+            }
             if (lo < hi) {
                 // Swap values and keep track of pivot position in case the pivot itself is swapped
-                if (lo == pivot) pivot = hi;
-                else if (hi == pivot) pivot = lo;
+                if (lo == pivot) {
+                    pivot = hi;
+                } else if (hi == pivot) {
+                    pivot = lo;
+                }
                 swap(lo, hi);
                 lo++;
                 hi--;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/package-info.java Fri Nov  4 11:31:43 2011
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@aQute.bnd.annotation.Version("2.3")
+@aQute.bnd.annotation.Version("2.3.2")
 package org.apache.jackrabbit.commons;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/Parser.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/Parser.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/Parser.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/Parser.java Fri Nov  4 11:31:43 2011
@@ -794,7 +794,6 @@ public class Parser {
             while (true) {
                 type = types[i];
                 if (type != CHAR_NAME && type != CHAR_VALUE) {
-                    c = chars[i];
                     break;
                 }
                 i++;
@@ -937,9 +936,9 @@ public class Parser {
             if (types[i] != CHAR_VALUE) {
                 throw getSyntaxError();
             }
-            while (types[++i] == CHAR_VALUE) {
-                // go until the first non-number
-            }
+            do {
+                i++; // go until the first non-number
+            } while (types[i] == CHAR_VALUE);
         }
         parseIndex = i;
         String sub = statement.substring(start, i);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/package-info.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/package-info.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/query/sql2/package-info.java Fri Nov  4 11:31:43 2011
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@aQute.bnd.annotation.Version("2.3")
+@aQute.bnd.annotation.Version("2.3.1")
 package org.apache.jackrabbit.commons.query.sql2;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/JcrRemotingConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/JcrRemotingConstants.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/JcrRemotingConstants.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/JcrRemotingConstants.java Fri Nov  4 11:31:43 2011
@@ -129,6 +129,7 @@ public interface JcrRemotingConstants {
     public static final String JCR_VALUES_LN = "values";
     public static final String JCR_LENGTH_LN = "length";
     public static final String JCR_LENGTHS_LN = "lengths";
+    public static final String JCR_GET_STRING_LN = "getstring";
 
     public static final String JCR_NAMESPACES_LN = "namespaces";
     public static final String JCR_NODETYPES_CND_LN = "nodetypes-cnd";

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ValueUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ValueUtil.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ValueUtil.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/webdav/ValueUtil.java Fri Nov  4 11:31:43 2011
@@ -110,4 +110,40 @@ public class ValueUtil {
         // deserialize value ->> see #valueToXml where values are serialized
         return ValueHelper.deserialize(value, type, true, valueFactory);
     }
+
+    public static long[] lengthsFromXml(Object propValue) throws RepositoryException {
+        long[] lengths;
+        // retrieve jcr-values from child 'value'-element(s)
+        List<Element> lengthElements = new ArrayList<Element>();
+        if (propValue == null) {
+            lengths = new long[0];
+        } else { /* not null propValue */
+            if (isLengthElement(propValue)) {
+                lengthElements.add((Element) propValue);
+            } else if (propValue instanceof List) {
+                for (Object el : ((List<?>) propValue)) {
+                    /* make sure, only Elements with name 'value' are used for
+                    * the 'value' field. any other content (other elements, text,
+                    * comment etc.) is ignored. NO bad-request/conflict error is
+                    * thrown.
+                    */
+                    if (isLengthElement(el)) {
+                        lengthElements.add((Element) el);
+                    }
+                }
+            }
+            /* fill the 'value' with the valid 'value' elements found before */
+            lengths = new long[lengthElements.size()];
+            int i = 0;
+            for (Element element : lengthElements) {
+                lengths[i] = Long.parseLong(XMLUtil.getText(element, "0"));
+                i++;
+            }
+        }
+        return lengths;
+    }
+
+    private static boolean isLengthElement(Object obj) {
+        return obj instanceof Element && JcrRemotingConstants.XML_LENGTH.equals(((Element)obj).getLocalName());
+    }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java Fri Nov  4 11:31:43 2011
@@ -461,14 +461,40 @@ public class Text {
      * @return the escaped name
      */
     public static String escapeIllegalJcrChars(String name) {
+        return escapeIllegalChars(name, "%/:[]*|\t\r\n");
+    }
+
+    /**
+     * Escapes all illegal JCR 1.0 name characters of a string.
+     * Use {@link #unescapeIllegalJcrChars(String)} for decoding.
+     * <p>
+     * QName EBNF:<br>
+     * <xmp>
+     * simplename ::= onecharsimplename | twocharsimplename | threeormorecharname
+     * onecharsimplename ::= (* Any Unicode character except: '.', '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)
+     * twocharsimplename ::= '.' onecharsimplename | onecharsimplename '.' | onecharsimplename onecharsimplename
+     * threeormorecharname ::= nonspace string nonspace
+     * string ::= char | string char
+     * char ::= nonspace | ' '
+     * nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)
+     * </xmp>
+     *
+     * @since Apache Jackrabbit 2.3.2 and 2.2.10
+     * @see <a href="https://issues.apache.org/jira/browse/JCR-3128">JCR-3128</a>
+     * @param name the name to escape
+     * @return the escaped name
+     */
+    public static String escapeIllegalJcr10Chars(String name) {
+        return escapeIllegalChars(name, "%/:[]*'\"|\t\r\n");
+    }
+
+    private static String escapeIllegalChars(String name, String illegal) {
         StringBuilder buffer = new StringBuilder(name.length() * 2);
         for (int i = 0; i < name.length(); i++) {
             char ch = name.charAt(i);
-            if (ch == '%' || ch == '/' || ch == ':' || ch == '[' || ch == ']'
-                || ch == '*' || ch == '|'
-                || ch == '.' && name.length() < 3
-                || ch == ' ' && (i == 0 || i == name.length() - 1)
-                || ch == '\t' || ch == '\r' || ch == '\n') {
+            if (illegal.indexOf(ch) != -1
+                    || ch == '.' && name.length() < 3
+                    || ch == ' ' && (i == 0 || i == name.length() - 1)) {
                 buffer.append('%');
                 buffer.append(Character.toUpperCase(Character.forDigit(ch / 16, 16)));
                 buffer.append(Character.toUpperCase(Character.forDigit(ch % 16, 16)));

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/package-info.java Fri Nov  4 11:31:43 2011
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@aQute.bnd.annotation.Version("2.3")
+@aQute.bnd.annotation.Version("2.4")
 package org.apache.jackrabbit.util;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java Fri Nov  4 11:31:43 2011
@@ -81,7 +81,7 @@ public class DecimalValue extends BaseVa
             if (number == other.number) {
                 return true;
             } else if (number != null && other.number != null) {
-                return number.equals(other.number);
+                return number.compareTo(other.number) == 0;
             }
         }
         return false;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/package-info.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/package-info.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/package-info.java Fri Nov  4 11:31:43 2011
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@aQute.bnd.annotation.Version("2.2")
+@aQute.bnd.annotation.Version("2.2.1")
 package org.apache.jackrabbit.value;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/util/TextTest.java Fri Nov  4 11:31:43 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.util;
 
+import junit.framework.TestCase;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 /**
  * Test cases for the Text utility class.
  */
@@ -182,11 +182,17 @@ public class TextTest extends TestCase {
             fail("Text.unescape(" + string + "): " + unexpected.getMessage());
         }
     }
-        
-    public void testEscapeIllegalJcrChars() throws Exception {
 
+    public void testEscapeIllegalJcr10Chars() throws Exception {
+        // single and double quote are illegal in JCR 1.0
+        assertEquals("local%27name", Text.escapeIllegalJcr10Chars("local'name"));
+        assertEquals("local%22name", Text.escapeIllegalJcr10Chars("local\"name"));
+    }
+
+    public void testEscapeIllegalJcrChars() throws Exception {
         // single and double quote are valid since JCR 2.0
         assertEquals("local'name", Text.escapeIllegalJcrChars("local'name"));
-        assertEquals("local\"name", Text.escapeIllegalJcrChars("local\"name"));       
+        assertEquals("local\"name", Text.escapeIllegalJcrChars("local\"name"));
     }
+
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/QueryObjectModelFactoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/QueryObjectModelFactoryTest.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/QueryObjectModelFactoryTest.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/QueryObjectModelFactoryTest.java Fri Nov  4 11:31:43 2011
@@ -16,10 +16,6 @@
  */
 package org.apache.jackrabbit.test.api.query.qom;
 
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.query.qom.And;
@@ -38,6 +34,7 @@ import javax.jcr.query.qom.FullTextSearc
 import javax.jcr.query.qom.Join;
 import javax.jcr.query.qom.JoinCondition;
 import javax.jcr.query.qom.Length;
+import javax.jcr.query.qom.Literal;
 import javax.jcr.query.qom.LowerCase;
 import javax.jcr.query.qom.NodeLocalName;
 import javax.jcr.query.qom.NodeName;
@@ -55,7 +52,9 @@ import javax.jcr.query.qom.Selector;
 import javax.jcr.query.qom.Source;
 import javax.jcr.query.qom.StaticOperand;
 import javax.jcr.query.qom.UpperCase;
-import javax.jcr.query.qom.Literal;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
 
 /**
  * <code>QueryObjectModelFactoryTest</code> tests all methods on the
@@ -222,7 +221,7 @@ public class QueryObjectModelFactoryTest
             Comparison comp = qf.comparison(op1, operator, op2);
             assertTrue("Not a PropertyValue operand", comp.getOperand1() instanceof PropertyValue);
             assertTrue("Not a BindVariableValue operand", comp.getOperand2() instanceof BindVariableValue);
-            assertEquals("Wrong operator", operator.toString(), comp.getOperator());
+            assertEquals("Wrong operator", operator, comp.getOperator());
         }
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ItemDefinitionProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ItemDefinitionProviderImpl.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ItemDefinitionProviderImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ItemDefinitionProviderImpl.java Fri Nov  4 11:31:43 2011
@@ -330,7 +330,8 @@ public class ItemDefinitionProviderImpl 
                                 // then do not overwrite it. The whole reason there are multiple
                                 // potential matches is that the client did not specify the type,
                                 // thus obviously specified a String.
-                            } else {
+                            }
+                            else {
                                 // found best possible match
                                 match = qDef;
                             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java Fri Nov  4 11:31:43 2011
@@ -22,6 +22,8 @@ import javax.jcr.RepositoryException;
 import javax.jcr.NodeIterator;
 import javax.jcr.Node;
 import javax.jcr.NamespaceRegistry;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
 import java.util.List;
 import java.util.ArrayList;
 
@@ -55,7 +57,7 @@ public class QueryTest extends AbstractQ
         }
 
         Node n = testRootNode.addNode("spiTest:node");
-        testRootNode.save();
+        superuser.save();
 
         for (int i = 0; i < 10; i++) {
             String prefix = defaultPrefix + i;
@@ -63,4 +65,42 @@ public class QueryTest extends AbstractQ
             executeXPathQuery(superuser, testPath + "/" + prefix + ":node", new Node[]{n});
         }
     }
+
+    /**
+     * https://issues.apache.org/jira/browse/JCR-3089
+     */
+    public void testSQL2Simple() throws Exception {
+        Query q = qm.createQuery("SELECT * FROM [nt:unstructured]",
+                Query.JCR_SQL2);
+        QueryResult r = q.execute();
+        assertTrue(r.getNodes().hasNext());
+    }
+
+    /**
+     * https://issues.apache.org/jira/browse/JCR-2543
+     */
+    public void testSQL2Limit() throws Exception {
+        Query q = qm.createQuery("SELECT * FROM [nt:unstructured]",
+                Query.JCR_SQL2);
+        q.setLimit(1);
+        QueryResult r = q.execute();
+
+        NodeIterator it = r.getNodes();
+        assertTrue(it.hasNext());
+        it.next();
+        assertFalse(it.hasNext());
+    }
+
+    /**
+     * https://issues.apache.org/jira/browse/JCR-3089
+     */
+    public void testSQL2Join() throws Exception {
+        // he query is not supposed to return anything, it will just check that
+        // the back and forth between the client and the server works
+        Query q = qm
+                .createQuery(
+                        "SELECT * FROM [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS b ON b.[refid] = a.[jcr:uuid]",
+                        Query.JCR_SQL2);
+        assertNotNull(q.execute());
+    }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-parent/pom.xml?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-parent/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-parent/pom.xml Fri Nov  4 11:31:43 2011
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-    <version>9</version>
+    <version>10</version>
     <relativePath />
   </parent>
 
@@ -38,8 +38,8 @@
   <packaging>pom</packaging>
 
   <properties>
-    <slf4j.version>1.6.1</slf4j.version>
-    <logback.version>0.9.27</logback.version>
+    <slf4j.version>1.6.4</slf4j.version>
+    <logback.version>1.0.0</logback.version>
   </properties>
 
   <url>http://jackrabbit.apache.org/</url>
@@ -86,6 +86,24 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>integrationTesting</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
   <build>
@@ -204,7 +222,7 @@
       <dependency>
         <groupId>org.easymock</groupId>
         <artifactId>easymock</artifactId>
-        <version>2.5.2</version>
+        <version>3.0</version>
       </dependency>
       <dependency>
         <groupId>org.json</groupId>

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/pom.xml?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/pom.xml Fri Nov  4 11:31:43 2011
@@ -59,7 +59,7 @@
             <id>delete-sources</id>
             <phase>process-sources</phase>
             <configuration>
-              <tasks>
+              <target>
                 <echo>Remove files that have been customized in Jackrabbit</echo>
                 <delete>
                   <fileset dir="${project.build.directory}/generated-sources/javacc/org/apache/jackrabbit/spi/commons/query">
@@ -70,7 +70,7 @@
                     <include name="xpath/SimpleNode.java" />
                   </fileset>
                 </delete>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
@@ -133,6 +133,48 @@
         </configuration>
       </plugin>
     </plugins>
+    <pluginManagement>
+      <plugins>
+        <!-- JCR-3136: Add m2e lifecycle mappings for Eclipse Indigo -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <versionRange>[1.6,)</versionRange>
+                    <goals>
+                      <goal>run</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute/>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>javacc-maven-plugin</artifactId>
+                    <versionRange>[2.4.1,)</versionRange>
+                    <goals>
+                      <goal>jjtree-javacc</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute/>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
 
   <dependencies>

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QNodeTypeDefinitionImpl.java Fri Nov  4 11:31:43 2011
@@ -323,9 +323,7 @@ public class QNodeTypeDefinitionImpl imp
     }
     
     //-------------------------------------------------------------< Object >---
-    /**
-     * @see Object#equals(Object)
-     */
+
     @Override
     public boolean equals(Object obj) {
         if (this == obj) {
@@ -351,7 +349,6 @@ public class QNodeTypeDefinitionImpl imp
      * This class is mutable and not meant to be used as a hash key.
      *
      * @return always zero
-     * @see Object#hashCode()
      */
     @Override
     public int hashCode() {
@@ -369,7 +366,13 @@ public class QNodeTypeDefinitionImpl imp
     private static Set<QPropertyDefinition> getSerializablePropertyDefs(
             QPropertyDefinition[] propDefs) {
         Set<QPropertyDefinition> defs = new HashSet<QPropertyDefinition>();
-        Collections.addAll(defs, propDefs);
+        for (QPropertyDefinition pd : propDefs) {
+            if (pd instanceof Serializable) {
+                defs.add(pd);
+            } else {
+                defs.add(new QPropertyDefinitionImpl(pd)); 
+            }
+        }
         return defs;
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java Fri Nov  4 11:31:43 2011
@@ -322,9 +322,8 @@ public final class PathParser {
                         builder.addLast(factory.getParentElement());
                         lastPos = pos;
                         state = STATE_PREFIX_START;
-                    } else if (state == STATE_PREFIX_START && c == EOF) {
-                        // ignore trailing slash
-                    } else if (state != STATE_URI) {
+                    } else if (state != STATE_URI
+                            && !(state == STATE_PREFIX_START && c == EOF)) { // ignore trailing slash
                         throw new MalformedPathException('\'' + jcrPath + "' is not a valid path. '" + c + "' not a valid name character.");
                     }
                     break;
@@ -350,9 +349,7 @@ public final class PathParser {
                         }
                         state = STATE_NAME_START;
                         // don't reset the lastPos/pos since prefix+name are passed together to the NameResolver
-                    } else if (state == STATE_IDENTIFIER || state == STATE_URI) {
-                        // nothing do
-                    } else {
+                    } else if (state != STATE_IDENTIFIER && state != STATE_URI) {
                         throw new MalformedPathException('\'' + jcrPath + "' is not a valid path. '" + c + "' not valid name character");
                     }
                     break;
@@ -365,9 +362,7 @@ public final class PathParser {
                         state = STATE_INDEX;
                         name = jcrPath.substring(lastPos, pos - 1);
                         lastPos = pos;
-                    } else if (state == STATE_IDENTIFIER) {
-                        // nothing do
-                    } else {
+                    } else if (state != STATE_IDENTIFIER) {
                         throw new MalformedPathException('\'' + jcrPath + "' is not a valid path. '" + c + "' not a valid name character.");
                     }
                     break;
@@ -383,9 +378,7 @@ public final class PathParser {
                             throw new MalformedPathException('\'' + jcrPath + "' is not a valid path. Index number invalid: " + index);
                         }
                         state = STATE_INDEX_END;
-                    } else if (state == STATE_IDENTIFIER) {
-                        // nothing do
-                    } else {
+                    } else if (state != STATE_IDENTIFIER) {
                         throw new MalformedPathException('\'' + jcrPath + "' is not a valid path. '" + c + "' not a valid name character.");
                     }
                     break;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java Fri Nov  4 11:31:43 2011
@@ -606,6 +606,9 @@ public final class NameConstants {
     /** rep:policy */
     public static final Name REP_POLICY = rep("policy");
 
+    /** rep:repoPolicy */
+    public static final Name REP_REPO_POLICY = rep("repoPolicy");
+
     /** rep:accesscontrol */
     public static final Name REP_ACCESSCONTROL = rep("accesscontrol");
 
@@ -621,6 +624,9 @@ public final class NameConstants {
     /** rep:AccessControllable */
     public static final Name REP_ACCESS_CONTROLLABLE = rep("AccessControllable");
 
+    /** rep:RepoAccessControllable */
+    public static final Name REP_REPO_ACCESS_CONTROLLABLE = rep("RepoAccessControllable");
+
     /** rep:ACL */
     public static final Name REP_ACL = rep("ACL");
 
@@ -724,12 +730,24 @@ public final class NameConstants {
     public static final Name JCR_RETENTION_MANAGEMENT =
         FACTORY.create(Privilege.JCR_RETENTION_MANAGEMENT);
 
+    /** jcr:workspaceManagement */
+    // TODO replace with Privilege constant once next JCR version is released
+    public static final Name JCR_WORKSPACE_MANAGEMENT =
+        FACTORY.create("{http://www.jcp.org/jcr/1.0}workspaceManagement");
+
+    /** jcr:nodeTypeDefinitionManagement */
+    // TODO replace with Privilege constant once next JCR version is released
+    public static final Name JCR_NODE_TYPE_DEFINITION_MANAGEMENT =
+        FACTORY.create("{http://www.jcp.org/jcr/1.0}nodeTypeDefinitionManagement");
+
+    /** jcr:namespaceManagement */
+    // TODO replace with Privilege constant once next JCR version is released
+    public static final Name JCR_NAMESPACE_MANAGEMENT =
+        FACTORY.create("{http://www.jcp.org/jcr/1.0}namespaceManagement");
+
     /** jcr:write */
-    public static final Name JCR_WRITE =
-        FACTORY.create(Privilege.JCR_WRITE);
+    public static final Name JCR_WRITE = FACTORY.create(Privilege.JCR_WRITE);
 
     /** jcr:all */
-    public static final Name JCR_ALL =
-        FACTORY.create(Privilege.JCR_ALL);
-
-}
\ No newline at end of file
+    public static final Name JCR_ALL = FACTORY.create(Privilege.JCR_ALL);
+}

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java Fri Nov  4 11:31:43 2011
@@ -525,16 +525,25 @@ public class NodeTypeDefDiff {
 
                 if (!set1.equals(set2)) {
                     // valueConstraints have been modified
-                    if (set2.containsAll(set1)) {
-                        // new set is a super set of old set
-                        // => constraints have been removed
-                        // (TRIVIAL change, since constraints are OR-ed)
+                    if (set2.isEmpty()) {
+                        // all existing constraints have been cleared
+                        // => TRIVIAL change
+                        type = TRIVIAL;
+                    } else if (set1.isEmpty()) {
+                        // constraints have been set on a previously unconstrained property
+                        // => MAJOR change
+                        type = MAJOR;
+                    } else if (set2.containsAll(set1)) {
+                        // new set is a superset of old set,
+                        // i.e. constraints have been weakened
+                        // (since constraints are OR'ed)
+                        // => TRIVIAL change
                         type = TRIVIAL;
                     } else {
                         // constraint have been removed/modified (MAJOR change);
                         // since we're unable to semantically compare
                         // value constraints (e.g. regular expressions), all
-                        // modifications are considered a MAJOR change.
+                        // such modifications are considered a MAJOR change.
                         type = MAJOR;
                     }
                 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java?rev=1197515&r1=1197514&r2=1197515&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java Fri Nov  4 11:31:43 2011
@@ -182,25 +182,16 @@ public abstract class AbstractQValue imp
 
     //---------------------------------------------------------< QValue >---
 
-    /**
-     * @see QValue#getType()
-     */
     @Override
     public int getType() {
         return type;
     }
 
-    /**
-     * @see QValue#getLength()
-     */
     @Override
     public long getLength() throws RepositoryException {
         return getString().length();
     }
 
-    /**
-     * @see QValue#getName()
-     */
     @Override
     public Name getName() throws RepositoryException {
         if (type == PropertyType.NAME) {
@@ -214,14 +205,9 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getCalendar()
-     */
     @Override
     public Calendar getCalendar() throws RepositoryException {
-        if (type == PropertyType.DATE) {
-            return ISO8601.parse(getString());
-        } else if (type == PropertyType.DOUBLE) {
+        if (type == PropertyType.DOUBLE) {
             Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT+00:00"));
             cal.setTimeInMillis(((Double) val).longValue());
             return cal;
@@ -243,9 +229,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getDecimal()
-     */
     @Override
     public BigDecimal getDecimal() throws RepositoryException {
         if (type == PropertyType.DECIMAL) {
@@ -265,9 +248,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getURI()
-     */
     @Override
     public URI getURI() throws RepositoryException {
         if (type == PropertyType.URI) {
@@ -281,9 +261,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getDouble()
-     */
     @Override
     public double getDouble() throws RepositoryException {
         if (type == PropertyType.DOUBLE) {
@@ -303,9 +280,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getLong()
-     */
     @Override
     public long getLong() throws RepositoryException {
         if (type == PropertyType.LONG) {
@@ -325,10 +299,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @throws RepositoryException
-     * @see QValue#getBoolean()
-     */
     @Override
     public boolean getBoolean() throws RepositoryException {
         if (type == PropertyType.BOOLEAN) {
@@ -338,9 +308,6 @@ public abstract class AbstractQValue imp
         }
     }
 
-    /**
-     * @see QValue#getPath()
-     */
     @Override
     public Path getPath() throws RepositoryException {
         if (type == PropertyType.PATH) {
@@ -380,7 +347,6 @@ public abstract class AbstractQValue imp
      * {@link #getStream()} and skipping on the given stream as its underlying
      * mechanism to provide random access defined on {@link Binary}.
      *
-     * @see QValue#getBinary()
      */
     @Override
     public Binary getBinary() throws RepositoryException {
@@ -419,9 +385,6 @@ public abstract class AbstractQValue imp
         };
     }
 
-    /**
-     * @see QValue#discard()
-     */
     @Override
     public void discard() {
         // nothing to do
@@ -447,7 +410,6 @@ public abstract class AbstractQValue imp
      * this e.g. by special handling for DATE properties.
      *
      * @param obj
-     * @see Object#equals(Object)
      */
     @Override
     public boolean equals(Object obj) {
@@ -466,7 +428,6 @@ public abstract class AbstractQValue imp
      * this e.g. by special handling for DATE properties.
      *
      * @return the hashCode of the internal value object.
-     * @see Object#hashCode()
      */
     @Override
     public int hashCode() {



Mime
View raw message