jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1166179 [1/2] - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons: ./ batch/ conversion/ iterator/ logging/ name/ namespace/ nodetype/ nodetype/constraint/ query/ query/qom/ query/s...
Date Wed, 07 Sep 2011 13:45:25 GMT
Author: mduerig
Date: Wed Sep  7 13:45:24 2011
New Revision: 1166179

URL: http://svn.apache.org/viewvc?rev=1166179&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
clean up

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractRepositoryService.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ChildInfoImpl.java
    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/QPropertyDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/Operation.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/GenerationalCache.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathResolver.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SessionInfoLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathMap.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceMapping.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractItemDefinitionTemplate.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.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/nodetype/NodeTypeDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryConstants.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeDump.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ConstraintImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/JoinConditionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelTree.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/QueryFormat.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/QueryFormat.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/SimpleNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/XPathQueryBuilder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/StringCache.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/ValueFactoryQImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java Wed Sep  7 13:45:24 2011
@@ -60,7 +60,7 @@ public abstract class AbstractReadableRe
     /**
      * The name of the default workspace
      */
-    protected final String defaulWsp;
+    protected final String defaultWsp;
 
     /**
      * Creates a new {@code AbstractReadableRepositoryService}.
@@ -87,7 +87,7 @@ public abstract class AbstractReadableRe
         }
 
         this.wspNames = Collections.unmodifiableList(new ArrayList<String>(wspNames));
-        defaulWsp = defaultWsp;
+        this.defaultWsp = defaultWsp;
     }
 
     //------------------------------------< may be overwritten by subclasses>---
@@ -108,7 +108,7 @@ public abstract class AbstractReadableRe
     protected SessionInfo createSessionInfo(Credentials credentials, String workspaceName)
             throws RepositoryException {
 
-        return super.createSessionInfo(credentials, workspaceName == null? defaulWsp : workspaceName);
+        return super.createSessionInfo(credentials, workspaceName == null? defaultWsp : workspaceName);
     }
 
     // -------------------------------------------------------------< cache >---

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractRepositoryService.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractRepositoryService.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractRepositoryService.java Wed Sep  7 13:45:24 2011
@@ -200,8 +200,8 @@ public abstract class AbstractRepository
             reader = new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>(cnd, "",
                     this.namespaces, new QDefinitionBuilderFactory());
 
-            List<QNodeTypeDefinition> ntds = reader.getNodeTypeDefinitions();
-            nodeTypeDefs.registerNodeTypes(ntds.toArray(new QNodeTypeDefinition[ntds.size()]), true);
+            List<QNodeTypeDefinition> ntDefs = reader.getNodeTypeDefinitions();
+            nodeTypeDefs.registerNodeTypes(ntDefs.toArray(new QNodeTypeDefinition[ntDefs.size()]), true);
         }
         catch (ParseException e) {
             throw new RepositoryException("Error reading node type definitions", e);
@@ -471,7 +471,7 @@ public abstract class AbstractRepository
 
     /**
      * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
-     * with the {@code sessionInfo}, then returns the namepsace URI for the
+     * with the {@code sessionInfo}, then returns the namespace URI for the
      * given {@code prefix}.
      */
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ChildInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ChildInfoImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ChildInfoImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ChildInfoImpl.java Wed Sep  7 13:45:24 2011
@@ -22,7 +22,7 @@ import org.apache.jackrabbit.spi.Name;
 import java.io.Serializable;
 
 /**
- * <code>ChildInfoImpl</code> implements a serializable <code>ChildInfo</code>.
+ * {@code ChildInfoImpl} implements a serializable {@code ChildInfo}.
  */
 public class ChildInfoImpl implements ChildInfo, Serializable {
 
@@ -32,7 +32,7 @@ public class ChildInfoImpl implements Ch
     private final Name name;
 
     /**
-     * The unique id for this child info or <code>null</code> if it does not
+     * The unique id for this child info or {@code null} if it does not
      * have a unique id.
      */
     private final String uniqueId;
@@ -43,10 +43,10 @@ public class ChildInfoImpl implements Ch
     private final int index;
 
     /**
-     * Creates a new serializable <code>ChildInfoImpl</code>.
+     * Creates a new serializable {@code ChildInfoImpl}.
      *
      * @param name     the name of the child node.
-     * @param uniqueId the unique id of the child node or <code>null</code>.
+     * @param uniqueId the unique id of the child node or {@code null}.
      * @param index    the index of the child node.
      */
     public ChildInfoImpl(Name name, String uniqueId, int index) {
@@ -55,23 +55,17 @@ public class ChildInfoImpl implements Ch
         this.index = index;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public Name getName() {
         return name;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getUniqueID() {
         return uniqueId;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public int getIndex() {
         return index;
     }

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=1166179&r1=1166178&r2=1166179&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 Wed Sep  7 13:45:24 2011
@@ -174,7 +174,7 @@ public class QNodeTypeDefinitionImpl imp
     }
 
     /**
-     * Createa a new {@code QNodeTypeDefinitionImpl} from a JCR
+     * Create a a new {@code QNodeTypeDefinitionImpl} from a JCR
      * NodeType definition.
      *
      * @param def node type definition
@@ -391,7 +391,9 @@ public class QNodeTypeDefinitionImpl imp
         return defs;
     }
 
-    private static Name[] getNames(String[] jcrNames, NamePathResolver resolver) throws NamespaceException, IllegalNameException {
+    private static Name[] getNames(String[] jcrNames, NamePathResolver resolver)
+            throws NamespaceException, IllegalNameException {
+        
         Name[] names = new Name[jcrNames.length];
         for (int i = 0; i < jcrNames.length; i++) {
             names[i] = resolver.getQName(jcrNames[i]);
@@ -399,11 +401,9 @@ public class QNodeTypeDefinitionImpl imp
         return names;
     }
 
-    private static QPropertyDefinition[] createQPropertyDefinitions(Name declName,
-                                                                    PropertyDefinition[] pds,
-                                                                    NamePathResolver resolver,
-                                                                    QValueFactory qValueFactory)
-            throws RepositoryException {
+    private static QPropertyDefinition[] createQPropertyDefinitions(Name declaringName, PropertyDefinition[] pds,
+            NamePathResolver resolver, QValueFactory qValueFactory) throws RepositoryException {
+        
         if (pds == null || pds.length == 0) {
             return QPropertyDefinition.EMPTY_ARRAY;
         }
@@ -415,9 +415,9 @@ public class QNodeTypeDefinitionImpl imp
                     : resolver.getQName(propDef.getName());
             // check if propDef provides declaring node type and if it matches 'this' one.
             if (propDef.getDeclaringNodeType() != null) {
-                if (!declName.equals(resolver.getQName(propDef.getDeclaringNodeType().getName()))) {
+                if (!declaringName.equals(resolver.getQName(propDef.getDeclaringNodeType().getName()))) {
                     throw new RepositoryException("Property definition specified invalid declaring nodetype: "
-                            + propDef.getDeclaringNodeType().getName() + ", but should be " + declName);
+                            + propDef.getDeclaringNodeType().getName() + ", but should be " + declaringName);
                 }
             }
             QValue[] defVls = propDef.getDefaultValues() == null
@@ -432,7 +432,7 @@ public class QNodeTypeDefinitionImpl imp
                 }
             }
             declaredPropDefs[i] = new QPropertyDefinitionImpl(
-                    name, declName,
+                    name, declaringName,
                     propDef.isAutoCreated(),
                     propDef.isMandatory(),
                     propDef.getOnParentVersion(),
@@ -448,10 +448,9 @@ public class QNodeTypeDefinitionImpl imp
         return declaredPropDefs;
     }
 
-    private static QNodeDefinition[] createQNodeDefinitions(Name declName,
-                                                            NodeDefinition[] nds,
-                                                            NamePathResolver resolver)
-            throws RepositoryException {
+    private static QNodeDefinition[] createQNodeDefinitions(Name declaringName, NodeDefinition[] nds,
+            NamePathResolver resolver) throws RepositoryException {
+        
         if (nds == null || nds.length == 0) {
             return QNodeDefinition.EMPTY_ARRAY;
         }
@@ -463,9 +462,9 @@ public class QNodeTypeDefinitionImpl imp
                     : resolver.getQName(nodeDef.getName());
             // check if propDef provides declaring node type and if it matches 'this' one.
             if (nodeDef.getDeclaringNodeType() != null) {
-                if (!declName.equals(resolver.getQName(nodeDef.getDeclaringNodeType().getName()))) {
+                if (!declaringName.equals(resolver.getQName(nodeDef.getDeclaringNodeType().getName()))) {
                     throw new RepositoryException("Childnode definition specified invalid declaring nodetype: "
-                            + nodeDef.getDeclaringNodeType().getName() + ", but should be " + declName);
+                            + nodeDef.getDeclaringNodeType().getName() + ", but should be " + declaringName);
                 }
             }
             Name defaultPrimaryType = nodeDef.getDefaultPrimaryTypeName() == null
@@ -475,7 +474,7 @@ public class QNodeTypeDefinitionImpl imp
 
             declaredNodeDefs[i] = new QNodeDefinitionImpl(
                     name,
-                    declName,
+                    declaringName,
                     nodeDef.isAutoCreated(),
                     nodeDef.isMandatory(),
                     nodeDef.getOnParentVersion(),

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/QPropertyDefinitionImpl.java Wed Sep  7 13:45:24 2011
@@ -230,9 +230,9 @@ public class QPropertyDefinitionImpl ext
                     && multiple == other.isMultiple()
                     && fullTextSearchable == other.isFullTextSearchable()
                     && queryOrderable == other.isQueryOrderable()
-                    && ((valueConstraints == null || other.getValueConstraints() == null) ? (valueConstraints == other.getValueConstraints())
+                    && (valueConstraints == null || other.getValueConstraints() == null ? valueConstraints == other.getValueConstraints()
                         : new HashSet(Arrays.asList(valueConstraints)).equals(new HashSet(Arrays.asList(other.getValueConstraints()))))
-                    && ((defaultValues == null || other.getDefaultValues() == null) ? (defaultValues == other.getDefaultValues())
+                    && (defaultValues == null || other.getDefaultValues() == null ? defaultValues == other.getDefaultValues()
                         : new HashSet(Arrays.asList(defaultValues)).equals(new HashSet(Arrays.asList(other.getDefaultValues()))))
                     && new HashSet(Arrays.asList(availableQueryOperators)).equals(new HashSet(Arrays.asList(other.getAvailableQueryOperators())));
         }
@@ -252,8 +252,8 @@ public class QPropertyDefinitionImpl ext
             h = 37 * h + (multiple ? 11 : 43);
             h = 37 * h + (queryOrderable ? 11 : 43);
             h = 37 * h + (fullTextSearchable ? 11 : 43);
-            h = 37 * h + ((valueConstraints != null) ? new HashSet(Arrays.asList(valueConstraints)).hashCode() : 0);
-            h = 37 * h + ((defaultValues != null) ? new HashSet(Arrays.asList(defaultValues)).hashCode() : 0);
+            h = 37 * h + (valueConstraints != null ? new HashSet(Arrays.asList(valueConstraints)).hashCode() : 0);
+            h = 37 * h + (defaultValues != null ? new HashSet(Arrays.asList(defaultValues)).hashCode() : 0);
             h = 37 * h + new HashSet(Arrays.asList(availableQueryOperators)).hashCode();
             hashCode = h;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/Operation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/Operation.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/Operation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/Operation.java Wed Sep  7 13:45:24 2011
@@ -21,7 +21,7 @@ import org.apache.jackrabbit.spi.Batch;
 import javax.jcr.RepositoryException;
 
 /**
- * An <code>Operation</code> represents a method call on a {@link Batch}.
+ * An {@code Operation} represents a method call on a {@link Batch}.
  */
 public interface Operation {
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/GenerationalCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/GenerationalCache.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/GenerationalCache.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/GenerationalCache.java Wed Sep  7 13:45:24 2011
@@ -16,9 +16,9 @@
  */
 package org.apache.jackrabbit.spi.commons.conversion;
 
-import java.util.Map;
 import java.util.HashMap;
-import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
 
 /**
  * Generational cache. The cache implemented by this class consists of three
@@ -138,9 +138,8 @@ class GenerationalCache {
 
         if (++age == maxAge) {
             Map union = new HashMap();
-            Iterator iterator = old.entrySet().iterator();
-            while (iterator.hasNext()) {
-                Map.Entry entry = (Map.Entry) iterator.next();
+            for (Object o : old.entrySet()) {
+                Entry entry = (Entry) o;
                 if (young.containsKey(entry.getKey())) {
                     union.put(entry.getKey(), entry.getValue());
                 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathResolver.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathResolver.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathResolver.java Wed Sep  7 13:45:24 2011
@@ -29,7 +29,7 @@ public interface PathResolver {
      * Returns the path object for the given JCR path string.
      *
      * @param path prefixed JCR path
-     * @return a <code>Path</code> object.
+     * @return a {@code Path} object.
      * @throws MalformedPathException if the JCR path format is invalid.
      * @throws IllegalNameException if any of the JCR names contained in the path are invalid.
      * @throws NamespaceException if a namespace prefix can not be resolved.
@@ -41,7 +41,7 @@ public interface PathResolver {
      *
      * @param path prefixed JCR path
      * @param normalizeIdentifier
-     * @return a <code>Path</code> object.
+     * @return a {@code Path} object.
      * @throws MalformedPathException if the JCR path format is invalid.
      * @throws IllegalNameException if any of the JCR names contained in the path are invalid.
      * @throws NamespaceException if a namespace prefix can not be resolved.
@@ -51,7 +51,7 @@ public interface PathResolver {
     /**
      * Returns the given JCR path string for the given path object.
      *
-     * @param path a <code>Path</code> object.
+     * @param path a {@code Path} object.
      * @return a JCR path string
      * @throws NamespaceException if a namespace URI can not be resolved
      */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicates.java Wed Sep  7 13:45:24 2011
@@ -26,6 +26,7 @@ public final class Predicates {
      * A predicate which is always true
      */
     public static final Predicate TRUE = new Predicate() {
+        @Override
         public boolean evaluate(Object arg) {
             return true;
         }
@@ -35,6 +36,7 @@ public final class Predicates {
      * A predicate which is always false
      */
     public static final Predicate FALSE = new Predicate() {
+        @Override
         public boolean evaluate(Object arg) {
             return false;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java Wed Sep  7 13:45:24 2011
@@ -666,18 +666,18 @@ public class RepositoryServiceLogger ext
 
     @Override
     public EventFilter createEventFilter(final SessionInfo sessionInfo, final int eventTypes,
-            final Path absPath, final boolean isDeep, final String[] uuid, final Name[] qnodeTypeName,
+            final Path absPath, final boolean isDeep, final String[] uuid, final Name[] qNodeTypeName,
             final boolean noLocal) throws RepositoryException {
 
         return (EventFilter) execute(new Callable() {
             @Override
             public Object call() throws RepositoryException {
                 return service.createEventFilter(unwrap(sessionInfo), eventTypes, absPath, isDeep, uuid,
-                       qnodeTypeName, noLocal);
+                       qNodeTypeName, noLocal);
             }
         }, "createEventFilter(SessionInfo, int, Path, boolean, String[], Name[], boolean)",
                 new Object[]{unwrap(sessionInfo), eventTypes, absPath, isDeep, uuid,
-                qnodeTypeName, noLocal});
+                qNodeTypeName, noLocal});
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SessionInfoLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SessionInfoLogger.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SessionInfoLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SessionInfoLogger.java Wed Sep  7 13:45:24 2011
@@ -27,8 +27,8 @@ public class SessionInfoLogger extends A
     private final SessionInfo sessionInfo;
 
     /**
-     * Create a new instance for the given <code>sessionInfo</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code sessionInfo} which uses
+     * {@code writer} for persisting log messages.
      * @param sessionInfo
      * @param writer
      */
@@ -46,32 +46,40 @@ public class SessionInfoLogger extends A
 
     // -----------------------------------------------------< SessionInfo >---
 
+    @Override
     public String getUserID() {
         return (String) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return sessionInfo.getUserID();
             }
         }, "getUserID()", new Object[]{});
     }
 
+    @Override
     public String getWorkspaceName() {
         return (String) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return sessionInfo.getWorkspaceName();
             }
         }, "getWorkspaceName()", new Object[]{});
     }
 
+    @Override
     public String[] getLockTokens() throws RepositoryException {
         return (String[]) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return sessionInfo.getLockTokens();
             }
         }, "getLockTokens()", new Object[]{});
     }
 
+    @Override
     public void addLockToken(final String lockToken) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 sessionInfo.addLockToken(lockToken);
                 return null;
@@ -79,8 +87,10 @@ public class SessionInfoLogger extends A
         }, "addLockToken(String)", new Object[]{lockToken});
     }
 
+    @Override
     public void removeLockToken(final String lockToken) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 sessionInfo.removeLockToken(lockToken);
                 return null;
@@ -88,8 +98,10 @@ public class SessionInfoLogger extends A
         }, "removeLockToken(String)", new Object[]{lockToken});
     }
 
+    @Override
     public void setUserData(final String userData) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 sessionInfo.setUserData(userData);
                 return null;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java Wed Sep  7 13:45:24 2011
@@ -20,7 +20,7 @@ import org.apache.jackrabbit.spi.NameFac
 import org.apache.jackrabbit.spi.Name;
 
 /**
- * <code>NameFactoryImpl</code>...
+ * {@code NameFactoryImpl}...
  */
 public class NameFactoryImpl implements NameFactory {
 
@@ -33,7 +33,7 @@ public class NameFactoryImpl implements 
      */
     private final HashCache<Name> cache = new HashCache<Name>();
 
-    private NameFactoryImpl() {};
+    private NameFactoryImpl() {}
 
     public static NameFactory getInstance() {
         return INSTANCE;
@@ -43,6 +43,7 @@ public class NameFactoryImpl implements 
     /**
      * @see NameFactory#create(String, String)
      */
+    @Override
     public Name create(String namespaceURI, String localName) throws IllegalArgumentException {
         // NOTE: an empty localName and/or URI is valid (e.g. the root node name)
         if (namespaceURI == null) {
@@ -57,6 +58,7 @@ public class NameFactoryImpl implements 
     /**
      * @see NameFactory#create(String)
      */
+    @Override
     public Name create(String nameString) throws IllegalArgumentException {
         if (nameString == null || "".equals(nameString)) {
             throw new IllegalArgumentException("No Name literal specified");
@@ -74,13 +76,13 @@ public class NameFactoryImpl implements 
             throw new IllegalArgumentException(
                     "Invalid Name literal: " + nameString);
         }
-        return (Name) cache.get(new NameImpl(
+        return cache.get(new NameImpl(
                 nameString.substring(1, i), nameString.substring(i + 1)));
     }
 
     //--------------------------------------------------------< inner class >---
     /**
-     * Inner class implementing the <code>Name</code> interface.
+     * Inner class implementing the {@code Name} interface.
      */
     private static class NameImpl implements Name {
 
@@ -117,6 +119,7 @@ public class NameFactoryImpl implements 
         /**
          * @see Name#getLocalName()
          */
+        @Override
         public String getLocalName() {
             return localName;
         }
@@ -124,18 +127,19 @@ public class NameFactoryImpl implements 
         /**
          * @see Name#getNamespaceURI()
          */
+        @Override
         public String getNamespaceURI() {
             return namespaceURI;
         }
 
         //---------------------------------------------------------< Object >---
         /**
-         * Returns the string representation of this <code>Name</code> in the
+         * Returns the string representation of this {@code Name} in the
          * following format:
          * <p/>
-         * <code><b>{</b>namespaceURI<b>}</b>localName</code>
+         * {@code <b>}{</b>namespaceURI<b>}</b>localName</code>
          *
-         * @return the string representation of this <code>Name</code>.
+         * @return the string representation of this {@code Name}.
          * @see NameFactory#create(String)
          * @see Object#toString()
          */
@@ -149,13 +153,13 @@ public class NameFactoryImpl implements 
         }
 
         /**
-         * Compares two names for equality. Returns <code>true</code>
-         * if the given object is a <code>Name</code> and has the same namespace
-         * URI and local part as this <code>Name</code>.
+         * Compares two names for equality. Returns {@code true}
+         * if the given object is a {@code Name} and has the same namespace
+         * URI and local part as this {@code Name}.
          *
          * @param obj the object to compare.
-         * @return <code>true</code> if the object is equal to this <code>Name</code>,
-         *         <code>false</code> otherwise.
+         * @return {@code true} if the object is equal to this {@code Name},
+         *         {@code false} otherwise.
          * @see Object#equals(Object)
          */
         @Override
@@ -199,8 +203,8 @@ public class NameFactoryImpl implements 
 
         //------------------------------------------------------< Cloneable >---
         /**
-         * Creates a clone of this <code>Name</code>.
-         * Overriden in order to make <code>clone()</code> public.
+         * Creates a clone of this {@code Name}.
+         * Overridden in order to make {@code clone()} public.
          *
          * @return a clone of this instance
          * @throws CloneNotSupportedException never thrown
@@ -214,11 +218,11 @@ public class NameFactoryImpl implements 
 
         //-----------------------------------------------------< Comparable >---
         /**
-         * Compares two <code>Name</code>s.
+         * Compares two {@code Name}s.
          *
-         * @param o the object to compare.
+         * @param other the object to compare.
          * @return comparison result
-         * @throws ClassCastException if the given object is not a <code>Name</code>.
+         * @throws ClassCastException if the given object is not a {@code Name}.
          * @see Comparable#compareTo(Object)
          */
         @Override
@@ -235,7 +239,7 @@ public class NameFactoryImpl implements 
 
         //---------------------------------------------------< Serializable >---
         /**
-         * Creates a new <code>Name</code> instance using the proper constructor
+         * Creates a new {@code Name} instance using the proper constructor
          * during deserialization in order to make sure that internalized strings
          * are used where appropriate.
          */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathMap.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathMap.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathMap.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathMap.java Wed Sep  7 13:45:24 2011
@@ -515,10 +515,7 @@ public class PathMap<T> {
          */
         private boolean hasPath(Path.Element[] elements, int len) {
             if (getPathElement().equals(elements[len - 1])) {
-                if (parent != null) {
-                    return parent.hasPath(elements, len - 1);
-                }
-                return true;
+                return parent == null || parent.hasPath(elements, len - 1);
             }
             return false;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java Wed Sep  7 13:45:24 2011
@@ -233,7 +233,7 @@ public abstract class Pattern {
             return isMatch;
         }
 
-        public Path getRemainder() throws RepositoryException {
+        public Path getRemainder() {
             if (pos >= length) {
                 return null;
             }
@@ -325,18 +325,21 @@ public abstract class Pattern {
         private final Pattern pattern;
         private final int min;
         private final int max;
-        private boolean hasBounds;
+        private final boolean hasBounds;
+
+        private RepeatPattern(Pattern pattern, int min, int max, boolean hasBounds) {
+            this.pattern = pattern;
+            this.min = min;
+            this.max = max;
+            this.hasBounds = hasBounds;
+        }
 
         public RepeatPattern(Pattern pattern) {
-            this(pattern, 0, 0);
-            hasBounds = false;
+            this(pattern, 0, 0, false);
         }
 
         public RepeatPattern(Pattern pattern, int min, int max) {
-            this.pattern = pattern;
-            this.min = min;
-            this.max = max;
-            hasBounds = true;
+            this(pattern, min, max, true);
         }
 
         @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceMapping.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceMapping.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceMapping.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceMapping.java Wed Sep  7 13:45:24 2011
@@ -165,12 +165,12 @@ public class NamespaceMapping implements
      */
     @Override
     public String toString() {
-        String s = "";
+        StringBuilder sb = new StringBuilder();
         for (Map.Entry<String, String> entry: prefixToURI.entrySet()) {
             String prefix = entry.getKey();
             String uri = entry.getValue();
-            s += '\'' + prefix + "' == '" + uri + "'\n";
+            sb.append('\'').append(prefix).append("' == '").append(uri).append("'\n");
         }
-        return s;
+        return sb.toString();
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/RegistryNamespaceResolver.java Wed Sep  7 13:45:24 2011
@@ -46,8 +46,7 @@ public class RegistryNamespaceResolver i
             return registry.getPrefix(uri);
         } catch (RepositoryException e) {
             if (!(e instanceof NamespaceException)) {
-                e = new NamespaceException(
-                        "Failed to resolve namespace URI: " + uri, e);
+                e = new NamespaceException("Failed to resolve namespace URI: " + uri, e);
             }
             throw (NamespaceException) e;
         }
@@ -59,8 +58,7 @@ public class RegistryNamespaceResolver i
             return registry.getURI(prefix);
         } catch (RepositoryException e) {
             if (!(e instanceof NamespaceException)) {
-                e = new NamespaceException(
-                        "Failed to resolve namespace prefix: " + prefix, e);
+                e = new NamespaceException("Failed to resolve namespace prefix: " + prefix, e);
             }
             throw (NamespaceException) e;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractItemDefinitionTemplate.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractItemDefinitionTemplate.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractItemDefinitionTemplate.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractItemDefinitionTemplate.java Wed Sep  7 13:45:24 2011
@@ -77,13 +77,14 @@ abstract class AbstractItemDefinitionTem
     }
 
     //-----------------------------------------------< ItemDefinition setters >
+    
     /**
      * Sets the name of the child item.
      *
      * @param name a {@code String}.
      * @throws ConstraintViolationException
      */
-    public void setName(String name) throws ConstraintViolationException {
+    public final void setName(String name) throws ConstraintViolationException {
         if (ItemDefinitionImpl.ANY_NAME.equals(name)) {
             // handle the * special case that isn't a valid JCR name but a valid
             // name for a ItemDefinition (residual).

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/AbstractNodeType.java Wed Sep  7 13:45:24 2011
@@ -156,10 +156,10 @@ public abstract class AbstractNodeType i
 
     @Override
     public NodeDefinition[] getDeclaredChildNodeDefinitions() {
-        QNodeDefinition[] cnda = ntd.getChildNodeDefs();
-        NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
-        for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]);
+        QNodeDefinition[] defs = ntd.getChildNodeDefs();
+        NodeDefinition[] nodeDefs = new NodeDefinition[defs.length];
+        for (int i = 0; i < defs.length; i++) {
+            nodeDefs[i] = ntMgr.getNodeDefinition(defs[i]);
         }
         return nodeDefs;
     }
@@ -234,9 +234,9 @@ public abstract class AbstractNodeType i
      * @see NodeType#getDeclaredSubtypes
      */
     public NodeTypeIterator getSubtypes(boolean directOnly) {
-        NodeTypeIterator iter;
+        NodeTypeIterator nts;
         try {
-            iter = ntMgr.getAllNodeTypes();
+            nts = ntMgr.getAllNodeTypes();
         } catch (RepositoryException e) {
             // should never get here
             log.error("failed to retrieve registered node types", e);
@@ -245,8 +245,8 @@ public abstract class AbstractNodeType i
 
         ArrayList<NodeType> result = new ArrayList<NodeType>();
         String thisName = getName();
-        while (iter.hasNext()) {
-            NodeType nt = iter.nextNodeType();
+        while (nts.hasNext()) {
+            NodeType nt = nts.nextNodeType();
             if (!nt.getName().equals(thisName)) {
                 if (directOnly) {
                     // direct subtypes only

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionTemplateImpl.java Wed Sep  7 13:45:24 2011
@@ -78,7 +78,7 @@ class NodeDefinitionTemplateImpl extends
     //-----------------------------------------------< NodeDefinitionTemplate >
 
     @Override
-    public void setRequiredPrimaryTypeNames(String[] requiredPrimaryTypeNames) throws ConstraintViolationException {
+    public final void setRequiredPrimaryTypeNames(String[] requiredPrimaryTypeNames) throws ConstraintViolationException {
         if (requiredPrimaryTypeNames == null) {
             throw new ConstraintViolationException("null isn't a valid array of JCR names.");
         } else {
@@ -94,7 +94,7 @@ class NodeDefinitionTemplateImpl extends
     }
 
     @Override
-    public void setDefaultPrimaryTypeName(String defaultPrimaryType) throws ConstraintViolationException {
+    public final void setDefaultPrimaryTypeName(String defaultPrimaryType) throws ConstraintViolationException {
         try {
             defaultPrimaryTypeName = defaultPrimaryType == null
                     ? null

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=1166179&r1=1166178&r2=1166179&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 Wed Sep  7 13:45:24 2011
@@ -280,15 +280,15 @@ public class NodeTypeDefDiff {
      */
     private int buildChildNodeDefDiffs() {
         int maxType = NONE;
-        QNodeDefinition[] cnda1 = oldDef.getChildNodeDefs();
+        QNodeDefinition[] childNodeDefs1 = oldDef.getChildNodeDefs();
         Map<QNodeDefinitionId, QNodeDefinition> defs1 = new HashMap<QNodeDefinitionId, QNodeDefinition>();
-        for (QNodeDefinition def1 : cnda1) {
+        for (QNodeDefinition def1 : childNodeDefs1) {
             defs1.put(new QNodeDefinitionId(def1), def1);
         }
 
-        QNodeDefinition[] cnda2 = newDef.getChildNodeDefs();
+        QNodeDefinition[] childNodeDefs2 = newDef.getChildNodeDefs();
         Map<QNodeDefinitionId, QNodeDefinition> defs2 = new HashMap<QNodeDefinitionId, QNodeDefinition>();
-        for (QNodeDefinition def2 : cnda2) {
+        for (QNodeDefinition def2 : childNodeDefs2) {
             defs2.put(new QNodeDefinitionId(def2), def2);
         }
 
@@ -326,17 +326,21 @@ public class NodeTypeDefDiff {
 
     @Override
     public String toString() {
-        String result = getClass().getName() + "[\n\tnodeTypeName="
-                + oldDef.getName();
+        String result = getClass().getName() + "[\n\t" +
+                "nodeTypeName=" + oldDef.getName();
 
-        result += ",\n\tmixinFlagDiff=" + modificationTypeToString(mixinFlagDiff());
-        result += ",\n\tsupertypesDiff=" + modificationTypeToString(supertypesDiff());
+        result += ",\n\t" +
+                "mixinFlagDiff=" + modificationTypeToString(mixinFlagDiff());
+        result += ",\n\t" +
+                "supertypesDiff=" + modificationTypeToString(supertypesDiff());
 
-        result += ",\n\tpropertyDifferences=[\n";
+        result += ",\n\t" +
+                "propertyDifferences=[\n";
         result += toString(propDefDiffs);
         result += "\t]";
 
-        result += ",\n\tchildNodeDifferences=[\n";
+        result += ",\n\t" +
+                "childNodeDifferences=[\n";
         result += toString(childNodeDefDiffs);
         result += "\t]\n";
         result += "]\n";
@@ -345,21 +349,21 @@ public class NodeTypeDefDiff {
     }
 
     private static String toString(List<? extends ChildItemDefDiff> childItemDefDiffs) {
-        String result = "";
-        for (Iterator iter = childItemDefDiffs.iterator(); iter.hasNext();) {
-            ChildItemDefDiff propDefDiff = (ChildItemDefDiff) iter.next();
-            result += "\t\t" + propDefDiff;
-            if (iter.hasNext()) {
-                result += ",";
+        StringBuilder sb = new StringBuilder();
+        for (Iterator diffs = childItemDefDiffs.iterator(); diffs.hasNext();) {
+            ChildItemDefDiff propDefDiff = (ChildItemDefDiff) diffs.next();
+            sb.append("\t\t").append(propDefDiff);
+            if (diffs.hasNext()) {
+                sb.append(',');
             }
-            result += "\n";
+            sb.append('\n');
         }
-        return result;
+        return sb.toString();
     }
 
-    private static String modificationTypeToString(int modifcationType) {
+    private static String modificationTypeToString(int modificationType) {
         String typeString = "unknown";
-        switch (modifcationType) {
+        switch (modificationType) {
             case NONE:
                 typeString = "NONE";
                 break;
@@ -513,9 +517,9 @@ public class NodeTypeDefDiff {
                 if (!set1.equals(set2)) {
                     // valueConstraints have been modified
                     if (set2.containsAll(set1)) {
-                        // new set is a superset of old set
+                        // new set is a super set of old set
                         // => constraints have been removed
-                        // (TRIVIAL change, since constraints are OR'ed)
+                        // (TRIVIAL change, since constraints are OR-ed)
                         type = TRIVIAL;
                     } else {
                         // constraint have been removed/modified (MAJOR change);
@@ -598,7 +602,7 @@ public class NodeTypeDefDiff {
                     if (!l1.equals(l2)) {
                         // requiredPrimaryTypes have been modified
                         if (l1.containsAll(l2)) {
-                            // old list is a superset of new list
+                            // old list is a super set of new list
                             // => removed requiredPrimaryType (TRIVIAL change)
                             type = TRIVIAL;
                         } else {
@@ -617,11 +621,11 @@ public class NodeTypeDefDiff {
      */
     static class QPropertyDefinitionId {
 
-        Name declaringNodeType;
-        Name name;
-        int requiredType;
-        boolean definesResidual;
-        boolean isMultiple;
+        private final Name declaringNodeType;
+        private final Name name;
+        private final int requiredType;
+        private final boolean definesResidual;
+        private final boolean isMultiple;
 
         QPropertyDefinitionId(QPropertyDefinition def) {
             declaringNodeType = def.getDeclaringNodeType();
@@ -665,17 +669,19 @@ public class NodeTypeDefDiff {
      */
     static class QNodeDefinitionId {
 
-        Name declaringNodeType;
-        Name name;
-        Name[] requiredPrimaryTypes;
+        private final Name declaringNodeType;
+        private final Name name;
+        private final Name[] requiredPrimaryTypes;
 
         QNodeDefinitionId(QNodeDefinition def) {
+            Name[] types;
             declaringNodeType = def.getDeclaringNodeType();
             name = def.getName();
-            requiredPrimaryTypes = def.getRequiredPrimaryTypes();
-            if (requiredPrimaryTypes == null || requiredPrimaryTypes.length == 0) {
-                requiredPrimaryTypes = new Name[]{NameConstants.NT_BASE};
+            types = def.getRequiredPrimaryTypes();
+            if (types == null || types.length == 0) {
+                types = new Name[]{NameConstants.NT_BASE};
             }
+            requiredPrimaryTypes = types;
             Arrays.sort(requiredPrimaryTypes);
         }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java Wed Sep  7 13:45:24 2011
@@ -143,10 +143,10 @@ public class NodeTypeDefinitionImpl impl
      */
     @Override
     public NodeDefinition[] getDeclaredChildNodeDefinitions() {
-        QNodeDefinition[] cnda = ntd.getChildNodeDefs();
-        NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
-        for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = new NodeDefinitionImpl(cnda[i], resolver);
+        QNodeDefinition[] childNodeDefs = ntd.getChildNodeDefs();
+        NodeDefinition[] nodeDefs = new NodeDefinition[childNodeDefs.length];
+        for (int i = 0; i < childNodeDefs.length; i++) {
+            nodeDefs[i] = new NodeDefinitionImpl(childNodeDefs[i], resolver);
         }
         return nodeDefs;
     }
@@ -157,16 +157,15 @@ public class NodeTypeDefinitionImpl impl
     @Override
     public String[] getDeclaredSupertypeNames() {
         Name[] stNames = ntd.getSupertypes();
-        String[] dstn = new String[stNames.length];
+        String[] nts = new String[stNames.length];
         for (int i = 0; i < stNames.length; i++) {
             try {
-                dstn[i] = resolver.getJCRName(stNames[i]);
+                nts[i] = resolver.getJCRName(stNames[i]);
             } catch (NamespaceException e) {
                 // should never get here
                 log.error("invalid node type name: " + stNames[i], e);
-                dstn[i] = stNames.toString();
             }
         }
-        return dstn;
+        return nts;
     }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorage.java Wed Sep  7 13:45:24 2011
@@ -47,7 +47,7 @@ public interface NodeTypeStorage {
      * @throws NoSuchNodeTypeException
      * @throws RepositoryException
      */
-    public Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException;
+    Iterator<QNodeTypeDefinition> getDefinitions(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException;
 
     /**
      * Add all {@link QNodeTypeDefinition}s provided to the store. If {@code allowUpdate} is {@code true}
@@ -58,7 +58,7 @@ public interface NodeTypeStorage {
      * @throws NodeTypeExistsException  If {@code allowUpdate} is {@code true} and a QNodeTypeDefinitions
      *   of that name already exists. In this case, none of the provided QNodeTypeDefinitions is registered.
      */
-    public void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate)
+    void registerNodeTypes(QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate)
             throws RepositoryException, NodeTypeExistsException;
 
     /**
@@ -68,5 +68,5 @@ public interface NodeTypeStorage {
      * @throws NoSuchNodeTypeException  If any of the QNodeTypeDefinitions does not exist. In this case
      * none of the provided is unregistered.
      */
-    public void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException;
+    void unregisterNodeTypes(Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException;
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java Wed Sep  7 13:45:24 2011
@@ -110,7 +110,7 @@ public class NodeTypeTemplateImpl implem
     //-----------------------------------------------------< NodeTypeTemplate >
 
     @Override
-    public void setName(String name) throws ConstraintViolationException {
+    public final void setName(String name) throws ConstraintViolationException {
         try {
             this.name = resolver.getQName(name);
         } catch (RepositoryException e) {
@@ -119,7 +119,7 @@ public class NodeTypeTemplateImpl implem
     }
 
     @Override
-    public void setDeclaredSuperTypeNames(String[] names) throws ConstraintViolationException {
+    public final void setDeclaredSuperTypeNames(String[] names) throws ConstraintViolationException {
         // TODO see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=797
         if (names == null) {
             throw new ConstraintViolationException("null isn't a valid array of JCR names.");            
@@ -151,7 +151,7 @@ public class NodeTypeTemplateImpl implem
     }
 
     @Override
-    public void setPrimaryItemName(String name) throws ConstraintViolationException {
+    public final void setPrimaryItemName(String name) throws ConstraintViolationException {
         if (name == null) {
             primaryItemName = null;
         } else {
@@ -164,7 +164,7 @@ public class NodeTypeTemplateImpl implem
     }
 
     @Override
-    public List getPropertyDefinitionTemplates() {
+    public final List getPropertyDefinitionTemplates() {
         if (propertyDefinitionTemplates == null) {
             propertyDefinitionTemplates = new LinkedList<PropertyDefinitionTemplate>();
         }
@@ -172,7 +172,7 @@ public class NodeTypeTemplateImpl implem
     }
 
     @Override
-    public List getNodeDefinitionTemplates() {
+    public final List getNodeDefinitionTemplates() {
         if (nodeDefinitionTemplates == null) {
             nodeDefinitionTemplates = new LinkedList<NodeDefinitionTemplate>();
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionTemplateImpl.java Wed Sep  7 13:45:24 2011
@@ -78,7 +78,7 @@ class PropertyDefinitionTemplateImpl ext
     }
 
     @Override
-    public void setValueConstraints(String[] constraints) {
+    public final void setValueConstraints(String[] constraints) {
         // TODO: see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=794
         this.constraints = constraints;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java Wed Sep  7 13:45:24 2011
@@ -37,8 +37,7 @@ import javax.jcr.nodetype.ConstraintViol
  * it.
  */
 public abstract class ValueConstraint implements QValueConstraint {
-
-    protected static Logger log = LoggerFactory.getLogger(ValueConstraint.class);
+    protected static final Logger log = LoggerFactory.getLogger(ValueConstraint.class);
 
     public static final ValueConstraint[] EMPTY_ARRAY = new ValueConstraint[0];
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java Wed Sep  7 13:45:24 2011
@@ -29,7 +29,7 @@ import java.util.List;
 public class OrderQueryNode extends QueryNode {
 
     /**
-     * The order spects
+     * The order specs
      */
     private final List<OrderSpec> specs = new ArrayList<OrderSpec>();
 
@@ -151,7 +151,7 @@ public class OrderQueryNode extends Quer
     }
 
     /**
-     * Returns {@code true} if the property {@code i} should be orderd
+     * Returns {@code true} if the property {@code i} should be ordered
      * ascending. If {@code false} the property is ordered descending.
      *
      * @param i index of the property

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryConstants.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryConstants.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryConstants.java Wed Sep  7 13:45:24 2011
@@ -169,7 +169,7 @@ public interface QueryConstants {
 
     /**
      * greater than operation: >
-     * general comparision
+     * general comparison
      */
     int OPERATION_GT_GENERAL = OPERATION_GT_VALUE + 1;
 
@@ -283,7 +283,7 @@ public interface QueryConstants {
     String OP_NAME_SIMILAR = "similarity";
 
     /**
-     * spellcheck operation:
+     * spell check operation:
      * XPath: rep:spellcheck(string_literal)
      * SQL: SPELLCHECK(string_literal)
      */
@@ -297,7 +297,7 @@ public interface QueryConstants {
     /**
      * Name of unknown operations
      */
-    String OP_NAME_UNKNOW = "UNKNOWN OPERATION";
+    String OP_NAME_UNKNOWN = "UNKNOWN OPERATION";
 
     /**
      * Operation names
@@ -332,7 +332,7 @@ public interface QueryConstants {
         @Override
         public String getName(int constant) {
             String name = (String) operationNames.get(constant);
-            return name == null? OP_NAME_UNKNOW : name;
+            return name == null? OP_NAME_UNKNOWN : name;
         }
     };
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryNode.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryNode.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryNode.java Wed Sep  7 13:45:24 2011
@@ -103,7 +103,7 @@ public abstract class QueryNode {
     }
 
     /**
-     * Accepts a {@link QueryNodeVisitor} and calls the apropriate {@code visit}
+     * Accepts a {@link QueryNodeVisitor} and calls the appropriate {@code visit}
      * method on the visitor depending on the concrete implementation of
      * this {@code QueryNode}.
      *

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeDump.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeDump.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeDump.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeDump.java Wed Sep  7 13:45:24 2011
@@ -16,12 +16,13 @@
  */
 package org.apache.jackrabbit.spi.commons.query;
 
-import java.util.Arrays;
-
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.spi.Path.Element;
+import org.apache.jackrabbit.spi.commons.query.OrderQueryNode.OrderSpec;
+
+import javax.jcr.RepositoryException;
+import java.util.Arrays;
 
 /**
  * Utility class to dump a {@link QueryNode} tree to a StringBuffer.
@@ -58,7 +59,7 @@ public class QueryTreeDump implements Qu
     }
 
     /**
-     * Dumps a query node tree to the string <code>buffer</code>.
+     * Dumps a query node tree to the string {@code buffer}.
      * @param node the root node of a query tree.
      * @param buffer a string buffer where to dump the tree structure.
      * @throws RepositoryException
@@ -67,24 +68,25 @@ public class QueryTreeDump implements Qu
         new QueryTreeDump(node, buffer);
     }
 
+    @Override
     public Object visit(QueryRootNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append("+ Root node");
-        buffer.append("\n");
+        buffer.append('\n');
         // select properties
         Name[] select = node.getSelectProperties();
         buffer.append("+ Select properties: ");
         if (select.length == 0) {
-            buffer.append("*");
+            buffer.append('*');
         } else {
             String comma = "";
-            for (int i = 0; i < select.length; i++) {
+            for (Name aSelect : select) {
                 buffer.append(comma);
-                buffer.append(select[i].toString());
+                buffer.append(aSelect.toString());
                 comma = ", ";
             }
         }
-        buffer.append("\n");
+        buffer.append('\n');
         // path
         traverse(new QueryNode[]{node.getLocationNode()}, buffer);
         // order by
@@ -95,53 +97,59 @@ public class QueryTreeDump implements Qu
         return buffer;
     }
 
+    @Override
     public Object visit(OrQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ OrQueryNode");
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(AndQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ AndQueryNode");
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(NotQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ NotQueryNode");
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(ExactQueryNode node, Object data) {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ ExactQueryNode: ");
         buffer.append(" Prop=").append(node.getPropertyName());
         buffer.append(" Value=").append(node.getValue());
-        buffer.append("\n");
+        buffer.append('\n');
         return buffer;
     }
 
+    @Override
     public Object visit(NodeTypeQueryNode node, Object data) {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ NodeTypeQueryNode: ");
         buffer.append(" Prop=").append(node.getPropertyName());
         buffer.append(" Value=").append(node.getValue());
-        buffer.append("\n");
+        buffer.append('\n');
         return buffer;
     }
 
+    @Override
     public Object visit(TextsearchQueryNode node, Object data) {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
@@ -149,7 +157,7 @@ public class QueryTreeDump implements Qu
         buffer.append(" Path=");
         Path relPath = node.getRelativePath();
         if (relPath == null) {
-            buffer.append(".");
+            buffer.append('.');
         } else {
             Path.Element[] elements = relPath.getElements();
             String slash = "";
@@ -157,32 +165,34 @@ public class QueryTreeDump implements Qu
                 buffer.append(slash);
                 slash = "/";
                 if (node.getReferencesProperty() && i == elements.length - 1) {
-                    buffer.append("@");
+                    buffer.append('@');
                 }
                 buffer.append(elements[i]);
             }
         }
         buffer.append(" Query=").append(node.getQuery());
-        buffer.append("\n");
+        buffer.append('\n');
         return buffer;
     }
 
+    @Override
     public Object visit(PathQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ PathQueryNode");
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(LocationStepQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ LocationStepQueryNode: ");
         buffer.append(" NodeTest=");
         if (node.getNameTest() == null) {
-            buffer.append("*");
+            buffer.append('*');
         } else {
             buffer.append(node.getNameTest());
         }
@@ -195,11 +205,12 @@ public class QueryTreeDump implements Qu
         } else {
             buffer.append(node.getIndex());
         }
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(RelationQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
@@ -227,34 +238,36 @@ public class QueryTreeDump implements Qu
             buffer.append(" Value=").append(node.getDateValue());
         }
 
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(OrderQueryNode node, Object data) {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ OrderQueryNode");
-        buffer.append("\n");
+        buffer.append('\n');
         OrderQueryNode.OrderSpec[] specs = node.getOrderSpecs();
-        for (int i = 0; i < specs.length; i++) {
+        for (OrderSpec spec : specs) {
             buffer.append(PADDING, 0, indent);
             buffer.append("  ");
-            appendPath(specs[i].getPropertyPath(), buffer);
-            buffer.append(" asc=").append(specs[i].isAscending());
-            buffer.append("\n");
+            appendPath(spec.getPropertyPath(), buffer);
+            buffer.append(" asc=").append(spec.isAscending());
+            buffer.append('\n');
         }
         return buffer;
     }
 
+    @Override
     public Object visit(DerefQueryNode node, Object data) throws RepositoryException {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
         buffer.append("+ DerefQueryNode: ");
         buffer.append(" NodeTest=");
         if (node.getNameTest() == null) {
-            buffer.append("*");
+            buffer.append('*');
         } else {
             buffer.append(node.getNameTest());
         }
@@ -267,11 +280,12 @@ public class QueryTreeDump implements Qu
         } else {
             buffer.append(node.getIndex());
         }
-        buffer.append("\n");
+        buffer.append('\n');
         traverse(node.getOperands(), buffer);
         return buffer;
     }
 
+    @Override
     public Object visit(PropertyFunctionQueryNode node, Object data) {
         StringBuffer buffer = (StringBuffer) data;
         buffer.append(PADDING, 0, indent);
@@ -288,14 +302,14 @@ public class QueryTreeDump implements Qu
             Arrays.fill(tmp, PADDING_CHAR);
             PADDING = tmp;
         }
-        for (int i = 0; i < node.length; i++) {
-            node[i].accept(this, buffer);
+        for (QueryNode aNode : node) {
+            aNode.accept(this, buffer);
         }
         indent -= 2;
     }
 
     /**
-     * Appends the relative path to the <code>buffer</code> using '/' as the
+     * Appends the relative path to the {@code buffer} using '/' as the
      * delimiter for path elements.
      *
      * @param relPath a relative path.
@@ -304,10 +318,10 @@ public class QueryTreeDump implements Qu
     private static void appendPath(Path relPath, StringBuffer buffer) {
         Path.Element[] elements = relPath.getElements();
         String slash = "";
-        for (int i = 0; i < elements.length; i++) {
+        for (Element element : elements) {
             buffer.append(slash);
             slash = "/";
-            buffer.append(elements[i]);
+            buffer.append(element);
         }
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java Wed Sep  7 13:45:24 2011
@@ -23,14 +23,17 @@ import org.apache.jackrabbit.spi.commons
 
 import javax.jcr.RepositoryException;
 import java.util.Date;
+
+import static org.apache.jackrabbit.spi.commons.query.QueryConstants.*;
+
 /**
  * Implements a query node that defines property value relation.
  */
-public class RelationQueryNode extends NAryQueryNode<QueryNode> implements QueryConstants {
+public class RelationQueryNode extends NAryQueryNode<QueryNode> {
 
     /**
-     * Acts as an syntetic placeholder for a location step that matches any
-     * name. This is required becase a JCR path does not allow a Name with
+     * Acts as an synthetic placeholder for a location step that matches any
+     * name. This is required because a JCR path does not allow a Name with
      * a single '*' (star) character.
      */
     public static final Name STAR_NAME_TEST = NameFactoryImpl.getInstance().create(Name.NS_REP_URI, "__star__");
@@ -82,8 +85,9 @@ public class RelationQueryNode extends N
     private final int operation;
 
     /**
-     * The value type of this relation. One of {@link #TYPE_DATE}, {@link
-     * #TYPE_DOUBLE}, {@link #TYPE_LONG}, {@link #TYPE_STRING}, {@link #TYPE_POSITION}.
+     * The value type of this relation. One of {@link QueryConstants#TYPE_DATE}, {@link
+     * QueryConstants#TYPE_DOUBLE}, {@link QueryConstants#TYPE_LONG}, {@link QueryConstants#TYPE_STRING},
+     * {@link QueryConstants#TYPE_POSITION}.
      */
     private int type;
 
@@ -182,7 +186,7 @@ public class RelationQueryNode extends N
 
     /**
      * Returns the {@code long} value if this relation if of type
-     * {@link #TYPE_LONG}.
+     * {@link QueryConstants#TYPE_LONG}.
      *
      * @return the {@code long} value.
      */
@@ -202,7 +206,7 @@ public class RelationQueryNode extends N
 
     /**
      * Returns the {@code int} position index value if this relation is
-     * of type {@link #TYPE_POSITION}.
+     * of type {@link QueryConstants#TYPE_POSITION}.
      * @return the position index value.
      */
     public int getPositionValue() {
@@ -221,7 +225,7 @@ public class RelationQueryNode extends N
 
     /**
      * Returns the {@code double} value if this relation if of type
-     * {@link #TYPE_DOUBLE}.
+     * {@link QueryConstants#TYPE_DOUBLE}.
      *
      * @return the {@code double} value.
      */
@@ -241,7 +245,7 @@ public class RelationQueryNode extends N
 
     /**
      * Returns the {@code String} value if this relation if of type
-     * {@link #TYPE_STRING}.
+     * {@link QueryConstants#TYPE_STRING}.
      *
      * @return the {@code String} value.
      */
@@ -261,7 +265,7 @@ public class RelationQueryNode extends N
 
     /**
      * Returns the {@code Date} value if this relation if of type
-     * {@link #TYPE_DATE}.
+     * {@link QueryConstants#TYPE_DATE}.
      *
      * @return the {@code Date} value.
      */

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ConstraintImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ConstraintImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ConstraintImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ConstraintImpl.java Wed Sep  7 13:45:24 2011
@@ -21,7 +21,7 @@ import org.apache.jackrabbit.spi.commons
 import javax.jcr.query.qom.Constraint;
 
 /**
- * <code>ConstraintImpl</code> is the common basis for classes that implement
+ * {@code ConstraintImpl} is the common basis for classes that implement
  * the {@link Constraint} interface.
  */
 public abstract class ConstraintImpl extends AbstractQOMNode implements Constraint {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/JoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/JoinConditionImpl.java?rev=1166179&r1=1166178&r2=1166179&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/JoinConditionImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/JoinConditionImpl.java Wed Sep  7 13:45:24 2011
@@ -21,7 +21,7 @@ import javax.jcr.query.qom.JoinCondition
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 
 /**
- * <code>JoinConditionImpl</code>...
+ * {@code JoinConditionImpl}...
  */
 public abstract class JoinConditionImpl
         extends AbstractQOMNode



Mime
View raw message