You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2013/03/07 16:49:48 UTC

svn commit: r1453926 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2: Property2IndexLookup.java strategy/ContentMirrorStoreStrategy.java

Author: thomasm
Date: Thu Mar  7 15:49:48 2013
New Revision: 1453926

URL: http://svn.apache.org/r1453926
Log:
OAK-666 Javadocs, improved exception message

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/ContentMirrorStoreStrategy.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java?rev=1453926&r1=1453925&r2=1453926&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java Thu Mar  7 15:49:48 2013
@@ -73,10 +73,11 @@ public class Property2IndexLookup {
      * 
      * @param propertyName property name
      * @param path lookup path
+     * @param filter for the node type restriction (null if no node type restriction)
      * @return true if the property is indexed
      */
     public boolean isIndexed(String propertyName, String path, Filter filter) {
-        if(PathUtils.denotesRoot(path)){
+        if (PathUtils.denotesRoot(path)) {
             return getIndexDataNode(root, propertyName, filter) != null;
         }
         NodeState node = root;
@@ -113,7 +114,7 @@ public class Property2IndexLookup {
      * applicable index with data.
      * 
      * @param propertyName the property name
-     * @param filter for the node type restriction
+     * @param filter for the node type restriction (null if no node type restriction)
      * @return the node where the index data is stored, or null if no index
      *         definition or index data node was found
      */

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/ContentMirrorStoreStrategy.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/ContentMirrorStoreStrategy.java?rev=1453926&r1=1453925&r2=1453926&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/ContentMirrorStoreStrategy.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/strategy/ContentMirrorStoreStrategy.java Thu Mar  7 15:49:48 2013
@@ -132,7 +132,7 @@ public class ContentMirrorStoreStrategy 
         if (matchCount == 0) {
             index.removeNode(key);
         } else if (unique && matchCount > 1) {
-            throw new CommitFailedException("Uniqueness constraint violated");
+            throw new CommitFailedException("Uniqueness constraint violated for key " + key);
         }
     }