jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1467259 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
Date Fri, 12 Apr 2013 13:16:47 GMT
Author: angela
Date: Fri Apr 12 13:16:46 2013
New Revision: 1467259

URL: http://svn.apache.org/r1467259
Log:
minor improvement, javadoc

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java

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=1467259&r1=1467258&r2=1467259&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
Fri Apr 12 13:16:46 2013
@@ -73,6 +73,8 @@ public class IndexUtils {
      * @param unique        {@code true} if the index is expected the assert property
      *                      uniqueness.
      * @param propertyNames The property names that should be indexed.
+     * @param declaringNodeTypeNames The declaring node type names or {@code null}.
+     * @return the NodeBuilder of the new index definition.
      */
     public static NodeBuilder createIndexDefinition(@Nonnull NodeBuilder index,
                                              @Nonnull String indexDefName,
@@ -126,7 +128,10 @@ public class IndexUtils {
      * Checks only children of the provided state for an index definitions
      * container node, aka a node named {@link IndexConstants#INDEX_DEFINITIONS_NAME}
      *
-     * @return
+     * @param state
+     * @param indexConfigPath
+     * @param typeFilter
+     * @return A list of index definitions.
      */
     public static List<IndexDefinition> buildIndexDefinitions(NodeState state,
                                                               String indexConfigPath, String
typeFilter) {
@@ -149,6 +154,11 @@ public class IndexUtils {
 
     /**
      * Builds an {@link IndexDefinition} out of a {@link ChildNodeEntry}
+     *
+     * @param path
+     * @param def {@code ChildNodeEntry} storing the index definition.
+     * @param typeFilter
+     * @return a new {@code IndexDefinition}
      */
     private static IndexDefinition getDefinition(String path,
                                                  ChildNodeEntry def, String typeFilter) {
@@ -171,13 +181,13 @@ public class IndexUtils {
                 && ps.getValue(STRING).equals(INDEX_DEFINITIONS_NODE_TYPE);
     }
 
-    public static boolean getBoolean(NodeState state, String property,
-            boolean def) {
+    public static boolean getBoolean(NodeState state, String property, boolean def) {
         PropertyState ps = state.getProperty(property);
         if (ps == null) {
             return def;
+        } else {
+            return ps.getValue(BOOLEAN);
         }
-        return ps != null && ps.getValue(BOOLEAN);
     }
 
 }



Mime
View raw message