jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1437960 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/index/ main/java/org/apache/jackrabbit/oak/plugins/index/old/ test/java/org/apache/jackrabbit/oak/security/user/
Date Thu, 24 Jan 2013 11:19:03 GMT
Author: angela
Date: Thu Jan 24 11:19:02 2013
New Revision: 1437960

URL: http://svn.apache.org/viewvc?rev=1437960&view=rev
Log:
OAK-583 : Inconsistencies in property index definitions

- replace setNames by setStrings
- rename UNIQUE constant to UNIQUE_PROPERTY_NAME for naming consistency

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexConstants.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/old/PropertyIndexConstants.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexConstants.java?rev=1437960&r1=1437959&r2=1437960&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexConstants.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexConstants.java
Thu Jan 24 11:19:02 2013
@@ -34,7 +34,7 @@ public interface IndexConstants {
     /**
      * Marks a unique property index.
      */
-    String UNIQUE = "unique";
+    String UNIQUE_PROPERTY_NAME = "unique";
 
     /**
      * Defines the names of the properties that are covered by a specific

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java?rev=1437960&r1=1437959&r2=1437960&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
Thu Jan 24 11:19:02 2013
@@ -49,9 +49,9 @@ public class IndexUtils implements Index
         entry.setString(IndexConstants.TYPE_PROPERTY_NAME, "p2");
         entry.setBoolean(IndexConstants.REINDEX_PROPERTY_NAME, true);
         if (unique) {
-            entry.setBoolean(IndexConstants.UNIQUE, true);
+            entry.setBoolean(IndexConstants.UNIQUE_PROPERTY_NAME, true);
         }
-        entry.setNames(IndexConstants.PROPERTY_NAMES, propertyNames);
+        entry.setStrings(IndexConstants.PROPERTY_NAMES, propertyNames);
     }
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/old/PropertyIndexConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/old/PropertyIndexConstants.java?rev=1437960&r1=1437959&r2=1437960&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/old/PropertyIndexConstants.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/old/PropertyIndexConstants.java
Thu Jan 24 11:19:02 2013
@@ -51,6 +51,6 @@ public interface PropertyIndexConstants 
     /**
      * Marks a unique index.
      */
-    String UNIQUE = IndexConstants.UNIQUE;
+    String UNIQUE = IndexConstants.UNIQUE_PROPERTY_NAME;
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java?rev=1437960&r1=1437959&r2=1437960&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserInitializerTest.java
Thu Jan 24 11:19:02 2013
@@ -111,7 +111,7 @@ public class UserInitializerTest extends
         assertNotNull(tree);
         NodeUtil node = new NodeUtil(tree);
 
-        assertEquals(isUnique, node.getBoolean(IndexConstants.UNIQUE));
+        assertEquals(isUnique, node.getBoolean(IndexConstants.UNIQUE_PROPERTY_NAME));
         assertArrayEquals(new String[] {propName}, node.getNames(IndexConstants.PROPERTY_NAMES));
     }
 }
\ No newline at end of file



Mime
View raw message