jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1166138 [4/12] - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ jackrabbit-spi-commons/src/main/ja...
Date Wed, 07 Sep 2011 12:00:20 GMT
Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java Wed Sep  7 12:00:14 2011
@@ -29,17 +29,14 @@ import javax.jcr.RepositoryException;
 import java.io.Serializable;
 
 /**
- * <code>AbstractIdFactory</code>...
+ * {@code AbstractIdFactory}...
  */
 public abstract class AbstractIdFactory implements IdFactory {
 
     private static final char DELIMITER = '@';
 
     //----------------------------------------------------------< IdFactory >---
-    /**
-     * {@inheritDoc}
-     * @see IdFactory#createNodeId(NodeId, Path)
-     */
+    @Override
     public NodeId createNodeId(NodeId parentId, Path path) {
         try {
             return new NodeIdImpl(parentId, path, getPathFactory());
@@ -48,26 +45,17 @@ public abstract class AbstractIdFactory 
         }
     }
 
-    /**
-     * {@inheritDoc}
-     * @see IdFactory#createNodeId(String, Path)
-     */
+    @Override
     public NodeId createNodeId(String uniqueID, Path path) {
         return new NodeIdImpl(uniqueID, path);
     }
 
-    /**
-     * {@inheritDoc}
-     * @see IdFactory#createNodeId(String)
-     */
+    @Override
     public NodeId createNodeId(String uniqueID) {
         return new NodeIdImpl(uniqueID);
     }
 
-    /**
-     * {@inheritDoc}
-     * @see IdFactory#createPropertyId(NodeId,Name)
-     */
+    @Override
     public PropertyId createPropertyId(NodeId parentId, Name propertyName) {
         try {
             return new PropertyIdImpl(parentId, propertyName, getPathFactory());
@@ -79,6 +67,7 @@ public abstract class AbstractIdFactory 
     /**
      * @see IdFactory#toJcrIdentifier(NodeId)
      */
+    @Override
     public String toJcrIdentifier(NodeId nodeId) {
         // TODO improve
         String uniqueId = nodeId.getUniqueID();
@@ -88,7 +77,7 @@ public abstract class AbstractIdFactory 
         } else if (uniqueId == null) {
             return DELIMITER + path.toString();
         } else {
-            StringBuffer bf = new StringBuffer();
+            StringBuilder bf = new StringBuilder();
             bf.append(Text.escape(uniqueId, DELIMITER));
             bf.append(DELIMITER);
             bf.append(path.toString());
@@ -99,6 +88,7 @@ public abstract class AbstractIdFactory 
     /**
      * @see IdFactory#fromJcrIdentifier(String)
      */
+    @Override
     public NodeId fromJcrIdentifier(String jcrIdentifier) {
         // TODO improve
         int pos = jcrIdentifier.indexOf(DELIMITER);
@@ -118,18 +108,18 @@ public abstract class AbstractIdFactory 
     /**
      * Subclassed need to define a PathFactory used to create IDs
      *
-     * @return a implementation of <code>PathFactory</code>.
+     * @return a implementation of {@code PathFactory}.
      */
     protected abstract PathFactory getPathFactory();
 
     //------------------------------------------------------< Inner classes >---
 
-    private static abstract class ItemIdImpl implements ItemId, Serializable {
+    private abstract static class ItemIdImpl implements ItemId, Serializable {
 
         private final String uniqueID;
         private final Path path;
 
-        private transient int hashCode = 0;
+        private transient int hashCode;
 
         private ItemIdImpl(String uniqueID, Path path) {
             if (uniqueID == null && path == null) {
@@ -144,21 +134,21 @@ public abstract class AbstractIdFactory 
             if (parentId == null || name == null) {
                 throw new IllegalArgumentException("Invalid ItemIdImpl: parentId and name must not be null.");
             }
-            this.uniqueID = parentId.getUniqueID();
+            uniqueID = parentId.getUniqueID();
             Path parentPath = parentId.getPath();
             if (parentPath != null) {
-                this.path = factory.create(parentPath, name, true);
+                path = factory.create(parentPath, name, true);
             } else {
-                this.path = factory.create(name);
+                path = factory.create(name);
             }
         }
 
-        public abstract boolean denotesNode();
-
+        @Override
         public String getUniqueID() {
             return uniqueID;
         }
 
+        @Override
         public Path getPath() {
             return path;
         }
@@ -212,7 +202,7 @@ public abstract class AbstractIdFactory 
          */
         @Override
         public String toString() {
-            StringBuffer b = new StringBuffer();
+            StringBuilder b = new StringBuilder();
             if (uniqueID != null) {
                 b.append(uniqueID);
             }
@@ -237,7 +227,7 @@ public abstract class AbstractIdFactory 
 
         public NodeIdImpl(NodeId parentId, Path path, PathFactory factory)
                 throws RepositoryException {
-            super(parentId.getUniqueID(), (parentId.getPath() != null) ? factory.create(parentId.getPath(), path, true) : path);
+            super(parentId.getUniqueID(), parentId.getPath() != null ? factory.create(parentId.getPath(), path, true) : path);
         }
 
         @Override
@@ -251,13 +241,13 @@ public abstract class AbstractIdFactory 
                 return true;
             }
             if (obj instanceof NodeId) {
-                return super.equals((NodeId)obj);
+                return equals((NodeId) obj);
             }
             return false;
         }
     }
 
-    private static class PropertyIdImpl extends ItemIdImpl implements PropertyId, Serializable {
+    private static class PropertyIdImpl extends ItemIdImpl implements PropertyId {
 
         private static final long serialVersionUID = -1953124047770776444L;
 
@@ -274,10 +264,12 @@ public abstract class AbstractIdFactory 
             return false;
         }
 
+        @Override
         public NodeId getParentId() {
             return parentId;
         }
 
+        @Override
         public Name getName() {
             return getPath().getName();
         }
@@ -288,7 +280,7 @@ public abstract class AbstractIdFactory 
                 return true;
             }
             if (obj instanceof PropertyId) {
-                return super.equals((PropertyId)obj);
+                return equals((PropertyId) obj);
             }
             return false;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/IdFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/IdFactoryImpl.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/IdFactoryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/IdFactoryImpl.java Wed Sep  7 12:00:14 2011
@@ -21,20 +21,16 @@ import org.apache.jackrabbit.spi.PathFac
 import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
 
 /**
- * <code>IdFactoryImpl</code>...
+ * {@code IdFactoryImpl}...
  */
 public final class IdFactoryImpl extends AbstractIdFactory {
-
-    private static IdFactory INSTANCE;
+    private static final IdFactory INSTANCE = new IdFactoryImpl();
 
     private IdFactoryImpl() {
     }
 
     public static IdFactory getInstance() {
-        if (INSTANCE == null) {
-            INSTANCE = new IdFactoryImpl();
-        }
-        return IdFactoryImpl.INSTANCE;
+        return INSTANCE;
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/BoundedIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/BoundedIterator.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/BoundedIterator.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/BoundedIterator.java Wed Sep  7 12:00:14 2011
@@ -70,6 +70,7 @@ public class BoundedIterator<T> implemen
         }
     }
 
+    @Override
     public boolean hasNext() {
         if (next == null) {
             fetchNext();
@@ -78,6 +79,7 @@ public class BoundedIterator<T> implemen
         return next != null;
     }
 
+    @Override
     public T next() {
         if (!hasNext()) {
             throw new NoSuchElementException();
@@ -86,6 +88,7 @@ public class BoundedIterator<T> implemen
         return consumeNext();
     }
 
+    @Override
     public void remove() {
         throw new UnsupportedOperationException();
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Iterators.java Wed Sep  7 12:00:14 2011
@@ -38,12 +38,11 @@ import java.util.Iterator;
 public final class Iterators {
 
     private Iterators() {
-        super();
     }
 
     /**
-     * Returns an iterator containing the single element <code>element</code> of
-     * type <code>T</code>.
+     * Returns an iterator containing the single element {@code element} of
+     * type {@code T}.
      *
      * @param <T>
      * @param element
@@ -55,7 +54,7 @@ public final class Iterators {
     }
 
     /**
-     * Returns an empty iterator of type <code>T</code>.
+     * Returns an empty iterator of type {@code T}.
      *
      * @param <T>
      * @return
@@ -66,8 +65,8 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator for the concatenation of <code>iterator1</code> and
-     * <code>iterator2</code>.
+     * Returns an iterator for the concatenation of {@code iterator1} and
+     * {@code iterator2}.
      *
      * @param <T>
      * @param iterator1
@@ -80,7 +79,7 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator for the concatenation of all the given <code>iterators</code>.
+     * Returns an iterator for the concatenation of all the given {@code iterators}.
      *
      * @param <T>
      * @param iterators
@@ -92,7 +91,7 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator for the concatenation of all the given <code>iterators</code>.
+     * Returns an iterator for the concatenation of all the given {@code iterators}.
      *
      * @param <T>
      * @param iterators
@@ -104,7 +103,7 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator for elements of an array of <code>values</code>.
+     * Returns an iterator for elements of an array of {@code values}.
      *
      * @param <T>
      * @param values  the array to iterate over.
@@ -118,8 +117,8 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator with elements from an original <code>iterator</code> where the
-     * given <code>predicate</code> matches removed.
+     * Returns an iterator with elements from an original {@code iterator} where the
+     * given {@code predicate} matches removed.
      *
      * @param <T>
      * @param iterator
@@ -131,6 +130,7 @@ public final class Iterators {
             final Predicate<? super T> predicate) {
 
         return new FilterIterator(iterator, new org.apache.commons.collections.Predicate() {
+            @Override
             public boolean evaluate(Object object) {
                 return predicate.evaluate((T) object);
             }
@@ -138,8 +138,8 @@ public final class Iterators {
     }
 
     /**
-     * Returns an iterator with elements of an original  <code>iterator</code> transformed by
-     * a <code>transformer</code>.
+     * Returns an iterator with elements of an original  {@code iterator} transformed by
+     * a {@code transformer}.
      *
      * @param <T>
      * @param <R>
@@ -153,6 +153,7 @@ public final class Iterators {
             final Transformer<S, ? super R> transformer) {
 
         return new TransformIterator(iterator, new org.apache.commons.collections.Transformer() {
+            @Override
             public Object transform(Object input) {
                 return transformer.transform((S) input);
             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Predicate.java Wed Sep  7 12:00:14 2011
@@ -29,5 +29,5 @@ public interface Predicate<T> {
      * @param arg  the predicate to evaluate, should not be changed
      * @return true or false
      */
-    public boolean evaluate(T arg);
+    boolean evaluate(T arg);
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Transformer.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Transformer.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Transformer.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/iterator/Transformer.java Wed Sep  7 12:00:14 2011
@@ -27,9 +27,9 @@ public interface Transformer<A, R> {
     /**
      * Transforms the input object (leaving it unchanged) into some output object.
      *
-     * @param input  the object to be transformed, should be left unchanged
+     * @param argument  the object to be transformed, should be left unchanged
      * @return a transformed object
      */
-    public R transform(A argument);
+    R transform(A argument);
 
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java Wed Sep  7 12:00:14 2011
@@ -29,29 +29,28 @@ public class AbstractLogger {
     protected final LogWriter writer;
 
     /**
-     * Create a new instance of this log wrapper which uses <code>writer
+     * Create a new instance of this log wrapper which uses {@code writer}
      * </code> for persisting log messages.
      * @param writer
      */
     public AbstractLogger(LogWriter writer) {
-        super();
         this.writer = writer;
     }
 
     /**
-     * Execute a <code>thunk</code> of a method which might throw a {@link RepositoryException}. The call
+     * Execute a {@code thunk} of a method which might throw a {@link RepositoryException}. The call
      * is logged to {@link #writer} right before it is actually performed and after it returns. Any
      * exception thrown by the call is logged before it is re-thrown.
      * @param thunk  thunk of the method to execute
      * @param methodName  the name of the method
      * @param args  the arguments passed to the method
-     * @return  the value returned from executing the <code>thunk</code>
-     * @throws RepositoryException  if executing the <code>thunk</code> throws an Exception the
+     * @return the value returned from executing the {@code thunk}
+     * @throws RepositoryException  if executing the {@code thunk} throws an Exception the
      *   exception is re-thrown.
      */
     protected Object execute(Callable thunk, String methodName, Object[] args) throws RepositoryException {
         writer.enter(methodName, args);
-        Object result = null;
+        Object result;
         try {
             result = thunk.call();
             writer.leave(methodName, args, result);
@@ -68,12 +67,12 @@ public class AbstractLogger {
     }
 
     /**
-     * Execute a <code>thunk</code> of a method which does not throw any checked exception. The
+     * Execute a {@code thunk} of a method which does not throw any checked exception. The
      * call is logged to {@link #writer} right before it is actually performed and after it returns.
      * @param thunk  thunk of the method to execute
      * @param methodName  the name of the method
      * @param args  the arguments passed to the method
-     * @return  the value returned from executing the <code>thunk</code>
+     * @return the value returned from executing the {@code thunk}
      */
     protected Object execute(SafeCallable thunk, String methodName, Object[] args)  {
         writer.enter(methodName, args);
@@ -93,14 +92,14 @@ public class AbstractLogger {
      * Type of thunk used in {@link AbstractLogger#execute(Callable, String, Object[])
      */
     protected interface Callable {
-        public Object call() throws RepositoryException;
+        Object call() throws RepositoryException;
     }
 
     /**
      * Type of thunk used in {@link AbstractLogger#execute(SafeCallable, String, Object[])
      */
     protected interface SafeCallable {
-        public Object call();
+        Object call();
     }
 
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/BatchLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/BatchLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/BatchLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/BatchLogger.java Wed Sep  7 12:00:14 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.spi.commons.logging;
 
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.Name;
@@ -25,6 +23,8 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.QValue;
 
+import javax.jcr.RepositoryException;
+
 /**
  * Log wrapper for a {@link Batch}.
  */
@@ -32,8 +32,8 @@ public class BatchLogger extends Abstrac
     private final Batch batch;
 
     /**
-     * Create a new instance for the given <code>batch</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code batch} which uses
+     * {@code writer} for persisting log messages.
      * @param batch
      * @param writer
      */
@@ -51,90 +51,110 @@ public class BatchLogger extends Abstrac
 
     // -----------------------------------------------------< Batch >---
 
+    @Override
     public void addNode(final NodeId parentId, final Name nodeName, final Name nodetypeName, final String uuid)
             throws RepositoryException {
 
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.addNode(parentId, nodeName, nodetypeName, uuid);
                 return null;
             }}, "addNode(NodeId, Name, Name, String)", new Object[]{parentId, nodeName, nodetypeName, uuid});
     }
 
+    @Override
     public void addProperty(final NodeId parentId, final Name propertyName, final QValue value)
             throws RepositoryException {
 
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.addProperty(parentId, propertyName, value);
                 return null;
             }}, "addProperty(NodeId, Name, QValue)", new Object[]{parentId, propertyName, value});
     }
 
+    @Override
     public void addProperty(final NodeId parentId, final Name propertyName, final QValue[] values)
             throws RepositoryException {
 
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.addProperty(parentId, propertyName, values);
                 return null;
             }}, "addProperty(NodeId, Name, QValue[])", new Object[]{parentId, propertyName, values});
     }
 
+    @Override
     public void setValue(final PropertyId propertyId, final QValue value) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.setValue(propertyId, value);
                 return null;
             }}, "setValue(PropertyId, QValue)", new Object[]{propertyId, value});
     }
 
+    @Override
     public void setValue(final PropertyId propertyId, final QValue[] values) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.setValue(propertyId, values);
                 return null;
             }}, "setValue(PropertyId, QValue[])", new Object[]{propertyId, values});
     }
 
+    @Override
     public void remove(final ItemId itemId) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.remove(itemId);
                 return null;
             }}, "remove(ItemId)", new Object[]{itemId});
     }
 
+    @Override
     public void reorderNodes(final NodeId parentId, final NodeId srcNodeId, final NodeId beforeNodeId)
             throws RepositoryException {
 
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.reorderNodes(parentId, srcNodeId, beforeNodeId);
                 return null;
             }}, "reorderNodes(NodeId, NodeId, NodeId)", new Object[]{parentId, srcNodeId, beforeNodeId});
     }
 
+    @Override
     public void setMixins(final NodeId nodeId, final Name[] mixinNodeTypeNames) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.setMixins(nodeId, mixinNodeTypeNames);
                 return null;
             }}, "setMixins(NodeId, Name[])", new Object[]{nodeId, mixinNodeTypeNames});
     }
 
+    @Override
     public void setPrimaryType(final NodeId nodeId, final Name primaryNodeTypeName) throws RepositoryException {
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.setPrimaryType(nodeId, primaryNodeTypeName);
                 return null;
             }}, "setPrimaryType(NodeId, Name)", new Object[]{nodeId, primaryNodeTypeName});
     }
 
+    @Override
     public void move(final NodeId srcNodeId, final NodeId destParentNodeId, final Name destName)
             throws RepositoryException {
 
         execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 batch.move(srcNodeId, destParentNodeId, destName);
                 return null;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/IdFactoryLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/IdFactoryLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/IdFactoryLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/IdFactoryLogger.java Wed Sep  7 12:00:14 2011
@@ -29,8 +29,8 @@ public class IdFactoryLogger extends Abs
     private final IdFactory idFactory;
 
     /**
-     * Create a new instance for the given <code>idFactory</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code idFactory} which uses
+     * {@code writer} for persisting log messages.
      * @param idFactory
      * @param writer
      */
@@ -46,43 +46,55 @@ public class IdFactoryLogger extends Abs
         return idFactory;
     }
 
+    @Override
     public PropertyId createPropertyId(final NodeId parentId, final Name propertyName) {
         return (PropertyId) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.createPropertyId(parentId, propertyName);
             }}, "createPropertyId(NodeId, Name)", new Object[]{parentId, propertyName});
     }
 
+    @Override
     public NodeId createNodeId(final NodeId parentId, final Path path) {
         return (NodeId) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.createNodeId(parentId, path);
             }}, "createNodeId(NodeId, Path)", new Object[]{parentId, path});
     }
 
+    @Override
     public NodeId createNodeId(final String uniqueID, final Path path) {
         return (NodeId) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.createNodeId(uniqueID, path);
             }}, "createNodeId(String, Path)", new Object[]{uniqueID, path});
     }
 
+    @Override
     public NodeId createNodeId(final String uniqueID) {
         return (NodeId) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.createNodeId(uniqueID);
             }}, "createNodeId(String)", new Object[]{uniqueID});
     }
 
+    @Override
     public String toJcrIdentifier(final NodeId nodeId) {
         return (String) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.toJcrIdentifier(nodeId);
             }}, "toJcrIdentifier(String)", new Object[]{nodeId});
     }
 
+    @Override
     public NodeId fromJcrIdentifier(final String jcrIdentifier) {
         return (NodeId) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return idFactory.fromJcrIdentifier(jcrIdentifier);
             }}, "fromJcrIdentifier(String)", new Object[]{jcrIdentifier});

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriter.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriter.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriter.java Wed Sep  7 12:00:14 2011
@@ -29,14 +29,14 @@ public interface LogWriter {
      * to the time they represent.
      * @return
      */
-    public long systemTime();
+    long systemTime();
 
     /**
      * Called right before a method of a SPI entity is called.
      * @param methodName  name of the method which a about to be called
      * @param args  arguments passed to the methods which is about to be called.
      */
-    public void enter(String methodName, Object[] args);
+    void enter(String methodName, Object[] args);
 
     /**
      * Called right after a method of a SPI entity has been called if no
@@ -45,7 +45,7 @@ public interface LogWriter {
      * @param args  arguments passed to the method which has been called
      * @param result  return value of the method which has been called
      */
-    public void leave(String methodName, Object[] args, Object result);
+    void leave(String methodName, Object[] args, Object result);
 
     /**
      * Called right after a method of a SPI entity has been called and an
@@ -55,5 +55,5 @@ public interface LogWriter {
      * @param e  exception which was thrown by the method which has
      *   been called
      */
-    public void error(String methodName, Object[] args, Exception e);
+    void error(String methodName, Object[] args, Exception e);
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriterProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriterProvider.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriterProvider.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/LogWriterProvider.java Wed Sep  7 12:00:14 2011
@@ -32,43 +32,43 @@ public interface LogWriterProvider {
 
     /**
      * @param service
-     * @return  A LogWriter for logging calls to <code>service</code>.
+     * @return A LogWriter for logging calls to {@code service}.
      */
-    public LogWriter getLogWriter(RepositoryService service);
+    LogWriter getLogWriter(RepositoryService service);
 
     /**
      * @param nameFactory
-     * @return  A LogWriter for logging calls to <code>nameFactory</code>.
+     * @return A LogWriter for logging calls to {@code nameFactory}.
      */
-    public LogWriter getLogWriter(NameFactory nameFactory);
+    LogWriter getLogWriter(NameFactory nameFactory);
 
     /**
      * @param pathFactory
-     * @return  A LogWriter for logging calls to <code>pathFactory</code>.
+     * @return A LogWriter for logging calls to {@code pathFactory}.
      */
-    public LogWriter getLogWriter(PathFactory pathFactory);
+    LogWriter getLogWriter(PathFactory pathFactory);
 
     /**
      * @param idFactory
-     * @return  A LogWriter for logging calls to <code>idFactory</code>.
+     * @return A LogWriter for logging calls to {@code idFactory}.
      */
-    public LogWriter getLogWriter(IdFactory idFactory);
+    LogWriter getLogWriter(IdFactory idFactory);
 
     /**
      * @param qValueFactory
-     * @return  A LogWriter for logging calls to <code>qValueFactory</code>.
+     * @return A LogWriter for logging calls to {@code qValueFactory}.
      */
-    public LogWriter getLogWriter(QValueFactory qValueFactory);
+    LogWriter getLogWriter(QValueFactory qValueFactory);
 
     /**
      * @param sessionInfo
-     * @return  A LogWriter for logging calls to <code>sessionInfo</code>.
+     * @return A LogWriter for logging calls to {@code sessionInfo}.
      */
-    public LogWriter getLogWriter(SessionInfo sessionInfo);
+    LogWriter getLogWriter(SessionInfo sessionInfo);
 
     /**
      * @param batch
-     * @return  A LogWriter for logging calls to <code>batch</code>.
+     * @return A LogWriter for logging calls to {@code batch}.
      */
-    public LogWriter getLogWriter(Batch batch);
+    LogWriter getLogWriter(Batch batch);
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/NameFactoryLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/NameFactoryLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/NameFactoryLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/NameFactoryLogger.java Wed Sep  7 12:00:14 2011
@@ -26,8 +26,8 @@ public class NameFactoryLogger extends A
     private final NameFactory nameFactory;
 
     /**
-     * Create a new instance for the given <code>nameFactory</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code nameFactory} which uses
+     * {@code writer} for persisting log messages.
      * @param nameFactory
      * @param writer
      */
@@ -43,15 +43,19 @@ public class NameFactoryLogger extends A
         return nameFactory;
     }
 
+    @Override
     public Name create(final String namespaceURI, final String localName) {
         return (Name) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return nameFactory.create(namespaceURI, localName);
             }}, "create(String, String)", new Object[]{namespaceURI, localName});
     }
 
+    @Override
     public Name create(final String nameString) {
         return (Name) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return nameFactory.create(nameString);
             }}, "create(String)", new Object[]{nameString});

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/PathFactoryLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/PathFactoryLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/PathFactoryLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/PathFactoryLogger.java Wed Sep  7 12:00:14 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.spi.commons.logging;
 
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
-import org.apache.jackrabbit.spi.PathFactory;
 import org.apache.jackrabbit.spi.Path.Element;
+import org.apache.jackrabbit.spi.PathFactory;
+
+import javax.jcr.RepositoryException;
 
 /**
  * Log wrapper for a {@link PathFactory}.
@@ -30,8 +30,8 @@ public class PathFactoryLogger extends A
     private final PathFactory pathFactory;
 
     /**
-     * Create a new instance for the given <code>pathFactory</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code pathFactory} which uses
+     * {@code writer} for persisting log messages.
      * @param pathFactory
      * @param writer
      */
@@ -47,113 +47,142 @@ public class PathFactoryLogger extends A
         return pathFactory;
     }
 
+    @Override
     public Path create(final Path parent, final Path relPath, final boolean normalize)
             throws RepositoryException {
 
         return (Path) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return pathFactory.create(parent, relPath, normalize);
-            }}, "create(Path, Path, boolean)", new Object[]{parent, relPath, Boolean.valueOf(normalize)});
+            }}, "create(Path, Path, boolean)", new Object[]{parent, relPath, normalize});
     }
 
+    @Override
     public Path create(final Path parent, final Name name, final boolean normalize)
             throws RepositoryException {
 
         return (Path) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return pathFactory.create(parent, name, normalize);
-            }}, "create(Path, Name, boolean)", new Object[]{parent, name, Boolean.valueOf(normalize)});
+            }}, "create(Path, Name, boolean)", new Object[]{parent, name, normalize});
     }
 
+    @Override
     public Path create(final Path parent, final Name name, final int index, final boolean normalize)
             throws RepositoryException {
 
         return (Path) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return pathFactory.create(parent, name, index, normalize);
-            }}, "create(Path, Name, int, boolean)", new Object[]{parent, name, new Integer(index),
-                    Boolean.valueOf(normalize)});
+            }}, "create(Path, Name, int, boolean)", new Object[]{parent, name, index, normalize});
     }
 
+    @Override
     public Path create(final Name name) {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.create(name);
             }}, "create(Name)", new Object[]{name});
     }
 
+    @Override
     public Path create(final Name name, final int index) {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.create(name, index);
-            }}, "create(Name, int)", new Object[]{name, new Integer(index)});
+            }}, "create(Name, int)", new Object[]{name, index});
     }
 
+    @Override
     public Path create(final Element element) {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.create(element);
             }}, "create(Element)", new Object[]{element});
     }
 
+    @Override
     public Path create(final Element[] elements) {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.create(elements);
             }}, "create(Element[])", new Object[]{elements});
     }
 
+    @Override
     public Path create(final String pathString) {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.create(pathString);
             }}, "create(String)", new Object[]{pathString});
     }
 
+    @Override
     public Element createElement(final Name name) {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.createElement(name);
             }}, "createElement(Name)", new Object[]{name});
     }
 
+    @Override
     public Element createElement(final Name name, final int index) {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.createElement(name, index);
-            }}, "createElement(Name)", new Object[]{name, new Integer(index)});
+            }}, "createElement(Name)", new Object[]{name, index});
     }
 
+    @Override
     public Element createElement(final String identifier) throws IllegalArgumentException {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.createElement(identifier);
             }}, "createElement(String)", new Object[]{identifier});
     }
 
+    @Override
     public Element getCurrentElement() {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.getCurrentElement();
             }}, "getCurrentElement()", new Object[]{});
     }
 
+    @Override
     public Element getParentElement() {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.getParentElement();
             }}, "getParentElement()", new Object[]{});
     }
 
+    @Override
     public Element getRootElement() {
         return (Element) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.getRootElement();
             }}, "getRootElement()", new Object[]{});
     }
 
+    @Override
     public Path getRootPath() {
         return (Path) execute(new SafeCallable() {
+            @Override
             public Object call() {
                 return pathFactory.getRootPath();
             }}, "getRootPath()", new Object[]{});

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/QValueFactoryLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/QValueFactoryLogger.java?rev=1166138&r1=1166137&r2=1166138&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/QValueFactoryLogger.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/QValueFactoryLogger.java Wed Sep  7 12:00:14 2011
@@ -16,21 +16,20 @@
  */
 package org.apache.jackrabbit.spi.commons.logging;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Calendar;
-import java.net.URI;
-import java.math.BigDecimal;
-
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QValueFactory;
 
+import javax.jcr.RepositoryException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.Calendar;
+
 /**
  * Log wrapper for a {@link QValueFactory}.
  */
@@ -38,8 +37,8 @@ public class QValueFactoryLogger extends
     private final QValueFactory qValueFactory;
 
     /**
-     * Create a new instance for the given <code>qValueFactory</code> which uses
-     * <code>writer</code> for persisting log messages.
+     * Create a new instance for the given {@code qValueFactory} which uses
+     * {@code writer} for persisting log messages.
      * @param qValueFactory
      * @param writer
      */
@@ -55,82 +54,104 @@ public class QValueFactoryLogger extends
         return qValueFactory;
     }
 
+    @Override
     public QValue create(final String value, final int type) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value, type);
-            }}, "create(String, int)", new Object[]{value, new Integer(type)});
+            }}, "create(String, int)", new Object[]{value, type});
     }
 
+    @Override
     public QValue create(final Calendar value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(Calendar)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final double value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
-            }}, "create(double)", new Object[]{new Double(value)});
+            }}, "create(double)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final long value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
-            }}, "create(long)", new Object[]{new Long(value)});
+            }}, "create(long)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final boolean value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
-            }}, "create(boolean)", new Object[]{Boolean.valueOf(value)});
+            }}, "create(boolean)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final Name value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(Name)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final Path value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(Path)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final URI value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(URI)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final BigDecimal value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(BigDecimal)", new Object[]{value});
     }
 
+    @Override
     public QValue create(final byte[] value) throws RepositoryException {
         return (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(byte[])", new Object[]{value});
     }
 
+    @Override
     public QValue create(final InputStream value) throws RepositoryException, IOException {
-        final String methodName = "create(InputStream)";
-        final Object[] args = new Object[]{value};
+        String methodName = "create(InputStream)";
+        Object[] args = new Object[]{value};
         final IOException[] ex = new IOException[1];
 
         QValue result = (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 try {
                     return qValueFactory.create(value);
@@ -148,12 +169,14 @@ public class QValueFactoryLogger extends
         return result;
     }
 
+    @Override
     public QValue create(final File value) throws RepositoryException, IOException {
-        final String methodName = "create(File)";
-        final Object[] args = new Object[]{value};
+        String methodName = "create(File)";
+        Object[] args = new Object[]{value};
         final IOException[] ex = new IOException[1];
 
         QValue result = (QValue) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 try {
                     return qValueFactory.create(value);
@@ -171,8 +194,10 @@ public class QValueFactoryLogger extends
         return result;
     }
 
+    @Override
     public QValue[] computeAutoValues(final QPropertyDefinition propertyDefinition) throws RepositoryException {
         return (QValue[]) execute(new Callable() {
+            @Override
             public Object call() throws RepositoryException {
                 return qValueFactory.computeAutoValues(propertyDefinition);
             }}, "computeAutoValues(QPropertyDefinition)", new Object[]{propertyDefinition});



Mime
View raw message