jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1166240 [1/2] - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ jackrabbit-jcr2spi/src/main/java/org/a...
Date Wed, 07 Sep 2011 15:54:45 GMT
Author: mduerig
Date: Wed Sep  7 15:54:44 2011
New Revision: 1166240

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

Added:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/Unchecked.java
      - copied, changed from r1165747, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/Unchecked.java
Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeCache.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/Unchecked.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/conversion/GenerationalCache.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/AbstractLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/BatchLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/IdFactoryLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/NameFactoryLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/PathFactoryLogger.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/QValueFactoryLogger.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/namespace/NamespaceAdder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceExtractor.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/NodeTypeTemplateImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/NAryQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/PropertyFunctionQueryNode.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/QueryRootNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeBuilderRegistry.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/XPathQueryBuilder.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java?rev=1166240&r1=1166239&r2=1166240&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java Wed Sep  7 15:54:44 2011
@@ -62,7 +62,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import static org.apache.jackrabbit.jcr2spi.util.Unchecked.cast;
+import static org.apache.jackrabbit.spi.commons.util.Unchecked.cast;
 
 /**
  * {@code NodeEntryImpl} implements common functionality for child

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java?rev=1166240&r1=1166239&r2=1166240&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java Wed Sep  7 15:54:44 2011
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
 import javax.jcr.RepositoryException;
 import java.util.Map;
 
-import static org.apache.jackrabbit.jcr2spi.util.Unchecked.cast;
+import static org.apache.jackrabbit.spi.commons.util.Unchecked.cast;
 
 /**
  * {@code UniqueIdResolver} allows to retrieve {@code NodeEntry} instances

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeCache.java?rev=1166240&r1=1166239&r2=1166240&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeCache.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeCache.java Wed Sep  7 15:54:44 2011
@@ -30,7 +30,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.ArrayList;
 
-import static org.apache.jackrabbit.jcr2spi.util.Unchecked.cast;
+import static org.apache.jackrabbit.spi.commons.util.Unchecked.cast;
 
 /**
  * {@code NodeTypeCache} implements a cache for {@code QNodeTypeDefinition}s

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java?rev=1166240&r1=1166239&r2=1166240&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeManagerImpl.java Wed Sep  7 15:54:44 2011
@@ -53,7 +53,7 @@ import org.apache.jackrabbit.spi.commons
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.jackrabbit.jcr2spi.util.Unchecked.cast;
+import static org.apache.jackrabbit.spi.commons.util.Unchecked.cast;
 
 /**
  * A {@code NodeTypeManagerImpl} implements a session dependant

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -333,7 +333,7 @@ public class QNodeTypeDefinitionImpl imp
             QNodeTypeDefinitionImpl other = (QNodeTypeDefinitionImpl) obj;
             return (name == null ? other.name == null : name.equals(other.name))
                     && (primaryItemName == null ? other.primaryItemName == null : primaryItemName.equals(other.primaryItemName))
-                    && new HashSet(Arrays.asList(getSupertypes())).equals(new HashSet(Arrays.asList(other.getSupertypes())))
+                    && new HashSet<Name>(Arrays.asList(getSupertypes())).equals(new HashSet<Name>(Arrays.asList(other.getSupertypes())))
                     && isMixin == other.isMixin
                     && hasOrderableChildNodes == other.hasOrderableChildNodes
                     && isAbstract == other.isAbstract

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -231,10 +231,10 @@ public class QPropertyDefinitionImpl ext
                     && fullTextSearchable == other.isFullTextSearchable()
                     && queryOrderable == other.isQueryOrderable()
                     && (valueConstraints == null || other.getValueConstraints() == null ? valueConstraints == other.getValueConstraints()
-                        : new HashSet(Arrays.asList(valueConstraints)).equals(new HashSet(Arrays.asList(other.getValueConstraints()))))
+                        : new HashSet<QValueConstraint>(Arrays.asList(valueConstraints)).equals(new HashSet<QValueConstraint>(Arrays.asList(other.getValueConstraints()))))
                     && (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())));
+                        : new HashSet<QValue>(Arrays.asList(defaultValues)).equals(new HashSet<QValue>(Arrays.asList(other.getDefaultValues()))))
+                    && new HashSet<String>(Arrays.asList(availableQueryOperators)).equals(new HashSet<String>(Arrays.asList(other.getAvailableQueryOperators())));
         }
         return false;
     }
@@ -252,9 +252,9 @@ 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 + new HashSet(Arrays.asList(availableQueryOperators)).hashCode();
+            h = 37 * h + (valueConstraints != null ? new HashSet<QValueConstraint>(Arrays.asList(valueConstraints)).hashCode() : 0);
+            h = 37 * h + (defaultValues != null ? new HashSet<QValue>(Arrays.asList(defaultValues)).hashCode() : 0);
+            h = 37 * h + new HashSet<String>(Arrays.asList(availableQueryOperators)).hashCode();
             hashCode = h;
         }
         return hashCode;

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -54,17 +54,17 @@ class GenerationalCache {
     /**
      * Long term cache. Read only.
      */
-    private Map cache = new HashMap();
+    private Map<Object, Object> cache = new HashMap<Object, Object>();
 
     /**
      * Old cache generation.
      */
-    private Map old = new HashMap();
+    private Map<Object, Object> old = new HashMap<Object, Object>();
 
     /**
      * Young cache generation.
      */
-    private Map young = new HashMap();
+    private Map<Object, Object> young = new HashMap<Object, Object>();
 
     /**
      * Age of the young cache generation.
@@ -137,9 +137,8 @@ class GenerationalCache {
         young.put(key, value);
 
         if (++age == maxAge) {
-            Map union = new HashMap();
-            for (Object o : old.entrySet()) {
-                Entry entry = (Entry) o;
+            Map<Object, Object> union = new HashMap<Object, Object>();
+            for (Entry<Object, Object> entry : old.entrySet()) {
                 if (young.containsKey(entry.getKey())) {
                     union.put(entry.getKey(), entry.getValue());
                 }
@@ -153,7 +152,7 @@ class GenerationalCache {
             }
 
             old = young;
-            young = new HashMap();
+            young = new HashMap<Object, Object>();
             age = 0;
         }
     }

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -25,7 +25,7 @@ public final class Predicates {
     /**
      * A predicate which is always true
      */
-    public static final Predicate TRUE = new Predicate() {
+    public static final Predicate<?> TRUE = new Predicate() {
         @Override
         public boolean evaluate(Object arg) {
             return true;
@@ -35,7 +35,7 @@ public final class Predicates {
     /**
      * A predicate which is always false
      */
-    public static final Predicate FALSE = new Predicate() {
+    public static final Predicate<?> FALSE = new Predicate() {
         @Override
         public boolean evaluate(Object arg) {
             return false;
@@ -53,7 +53,7 @@ public final class Predicates {
      */
     @SuppressWarnings("unchecked")
     public static <T> Predicate<T> TRUE() {
-        return TRUE;
+        return (Predicate<T>) TRUE;
     }
 
     /**
@@ -63,7 +63,7 @@ public final class Predicates {
      */
     @SuppressWarnings("unchecked")
     public static <T> Predicate<T> FALSE() {
-        return FALSE;
+        return (Predicate<T>) FALSE;
     }
 
 }

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -48,9 +48,9 @@ public class AbstractLogger {
      * @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 {
+    protected <T> T execute(Callable<T> thunk, String methodName, Object[] args) throws RepositoryException {
         writer.enter(methodName, args);
-        Object result;
+        T result;
         try {
             result = thunk.call();
             writer.leave(methodName, args, result);
@@ -74,9 +74,9 @@ public class AbstractLogger {
      * @param args  the arguments passed to the method
      * @return the value returned from executing the {@code thunk}
      */
-    protected Object execute(SafeCallable thunk, String methodName, Object[] args)  {
+    protected <T> T execute(SafeCallable<T> thunk, String methodName, Object[] args)  {
         writer.enter(methodName, args);
-        Object result;
+        T result;
         try {
             result = thunk.call();
             writer.leave(methodName, args, result);
@@ -91,15 +91,15 @@ public class AbstractLogger {
     /**
      * Type of thunk used in {@link AbstractLogger#execute(Callable, String, Object[])
      */
-    protected interface Callable {
-        Object call() throws RepositoryException;
+    protected interface Callable<T> {
+        T call() throws RepositoryException;
     }
 
     /**
      * Type of thunk used in {@link AbstractLogger#execute(SafeCallable, String, Object[])
      */
-    protected interface SafeCallable {
-        Object call();
+    protected interface SafeCallable<T> {
+        T 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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -55,7 +55,7 @@ public class BatchLogger extends Abstrac
     public void addNode(final NodeId parentId, final Name nodeName, final Name nodetypeName, final String uuid)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.addNode(parentId, nodeName, nodetypeName, uuid);
@@ -67,7 +67,7 @@ public class BatchLogger extends Abstrac
     public void addProperty(final NodeId parentId, final Name propertyName, final QValue value)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.addProperty(parentId, propertyName, value);
@@ -79,7 +79,7 @@ public class BatchLogger extends Abstrac
     public void addProperty(final NodeId parentId, final Name propertyName, final QValue[] values)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.addProperty(parentId, propertyName, values);
@@ -89,7 +89,7 @@ public class BatchLogger extends Abstrac
 
     @Override
     public void setValue(final PropertyId propertyId, final QValue value) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.setValue(propertyId, value);
@@ -99,7 +99,7 @@ public class BatchLogger extends Abstrac
 
     @Override
     public void setValue(final PropertyId propertyId, final QValue[] values) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.setValue(propertyId, values);
@@ -109,7 +109,7 @@ public class BatchLogger extends Abstrac
 
     @Override
     public void remove(final ItemId itemId) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.remove(itemId);
@@ -121,7 +121,7 @@ public class BatchLogger extends Abstrac
     public void reorderNodes(final NodeId parentId, final NodeId srcNodeId, final NodeId beforeNodeId)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.reorderNodes(parentId, srcNodeId, beforeNodeId);
@@ -131,7 +131,7 @@ public class BatchLogger extends Abstrac
 
     @Override
     public void setMixins(final NodeId nodeId, final Name[] mixinNodeTypeNames) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.setMixins(nodeId, mixinNodeTypeNames);
@@ -141,7 +141,7 @@ public class BatchLogger extends Abstrac
 
     @Override
     public void setPrimaryType(final NodeId nodeId, final Name primaryNodeTypeName) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.setPrimaryType(nodeId, primaryNodeTypeName);
@@ -153,7 +153,7 @@ public class BatchLogger extends Abstrac
     public void move(final NodeId srcNodeId, final NodeId destParentNodeId, final Name destName)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 batch.move(srcNodeId, destParentNodeId, destName);

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -48,54 +48,54 @@ public class IdFactoryLogger extends Abs
 
     @Override
     public PropertyId createPropertyId(final NodeId parentId, final Name propertyName) {
-        return (PropertyId) execute(new SafeCallable() {
+        return execute(new SafeCallable<PropertyId>() {
             @Override
-            public Object call() {
+            public PropertyId 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() {
+        return execute(new SafeCallable<NodeId>() {
             @Override
-            public Object call() {
+            public NodeId 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() {
+        return execute(new SafeCallable<NodeId>() {
             @Override
-            public Object call() {
+            public NodeId 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() {
+        return execute(new SafeCallable<NodeId>() {
             @Override
-            public Object call() {
+            public NodeId call() {
                 return idFactory.createNodeId(uniqueID);
             }}, "createNodeId(String)", new Object[]{uniqueID});
     }
 
     @Override
     public String toJcrIdentifier(final NodeId nodeId) {
-        return (String) execute(new SafeCallable() {
+        return execute(new SafeCallable<String>() {
             @Override
-            public Object call() {
+            public String call() {
                 return idFactory.toJcrIdentifier(nodeId);
             }}, "toJcrIdentifier(String)", new Object[]{nodeId});
     }
 
     @Override
     public NodeId fromJcrIdentifier(final String jcrIdentifier) {
-        return (NodeId) execute(new SafeCallable() {
+        return execute(new SafeCallable<NodeId>() {
             @Override
-            public Object call() {
+            public NodeId 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/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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -45,18 +45,18 @@ public class NameFactoryLogger extends A
 
     @Override
     public Name create(final String namespaceURI, final String localName) {
-        return (Name) execute(new SafeCallable() {
+        return execute(new SafeCallable<Name>() {
             @Override
-            public Object call() {
+            public Name 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() {
+        return execute(new SafeCallable<Name>() {
             @Override
-            public Object call() {
+            public Name 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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -48,23 +48,19 @@ public class PathFactoryLogger extends A
     }
 
     @Override
-    public Path create(final Path parent, final Path relPath, final boolean normalize)
-            throws RepositoryException {
-
-        return (Path) execute(new Callable() {
+    public Path create(final Path parent, final Path relPath, final boolean normalize) throws RepositoryException {
+        return execute(new Callable<Path>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Path call() throws RepositoryException {
                 return pathFactory.create(parent, relPath, 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() {
+    public Path create(final Path parent, final Name name, final boolean normalize) throws RepositoryException {
+        return execute(new Callable<Path>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Path call() throws RepositoryException {
                 return pathFactory.create(parent, name, normalize);
             }}, "create(Path, Name, boolean)", new Object[]{parent, name, normalize});
     }
@@ -73,117 +69,117 @@ public class PathFactoryLogger extends A
     public Path create(final Path parent, final Name name, final int index, final boolean normalize)
             throws RepositoryException {
 
-        return (Path) execute(new Callable() {
+        return execute(new Callable<Path>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Path call() throws RepositoryException {
                 return pathFactory.create(parent, name, index, normalize);
             }}, "create(Path, Name, int, boolean)", new Object[]{parent, name, index, normalize});
     }
 
     @Override
     public Path create(final Name name) {
-        return (Path) execute(new SafeCallable() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path 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() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path call() {
                 return pathFactory.create(name, index);
             }}, "create(Name, int)", new Object[]{name, index});
     }
 
     @Override
     public Path create(final Element element) {
-        return (Path) execute(new SafeCallable() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path call() {
                 return pathFactory.create(element);
             }}, "create(Element)", new Object[]{element});
     }
 
     @Override
     public Path create(final Element[] elements) {
-        return (Path) execute(new SafeCallable() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path call() {
                 return pathFactory.create(elements);
             }}, "create(Element[])", new Object[]{elements});
     }
 
     @Override
     public Path create(final String pathString) {
-        return (Path) execute(new SafeCallable() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path call() {
                 return pathFactory.create(pathString);
             }}, "create(String)", new Object[]{pathString});
     }
 
     @Override
     public Element createElement(final Name name) {
-        return (Element) execute(new SafeCallable() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element 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() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element call() {
                 return pathFactory.createElement(name, index);
             }}, "createElement(Name)", new Object[]{name, index});
     }
 
     @Override
     public Element createElement(final String identifier) throws IllegalArgumentException {
-        return (Element) execute(new SafeCallable() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element call() {
                 return pathFactory.createElement(identifier);
             }}, "createElement(String)", new Object[]{identifier});
     }
 
     @Override
     public Element getCurrentElement() {
-        return (Element) execute(new SafeCallable() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element call() {
                 return pathFactory.getCurrentElement();
             }}, "getCurrentElement()", new Object[]{});
     }
 
     @Override
     public Element getParentElement() {
-        return (Element) execute(new SafeCallable() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element call() {
                 return pathFactory.getParentElement();
             }}, "getParentElement()", new Object[]{});
     }
 
     @Override
     public Element getRootElement() {
-        return (Element) execute(new SafeCallable() {
+        return execute(new SafeCallable<Element>() {
             @Override
-            public Object call() {
+            public Element call() {
                 return pathFactory.getRootElement();
             }}, "getRootElement()", new Object[]{});
     }
 
     @Override
     public Path getRootPath() {
-        return (Path) execute(new SafeCallable() {
+        return execute(new SafeCallable<Path>() {
             @Override
-            public Object call() {
+            public Path 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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -56,90 +56,90 @@ public class QValueFactoryLogger extends
 
     @Override
     public QValue create(final String value, final int type) throws RepositoryException {
-        return (QValue) execute(new Callable() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 return qValueFactory.create(value, type);
             }}, "create(String, int)", new Object[]{value, type});
     }
 
     @Override
     public QValue create(final Calendar value) throws RepositoryException {
-        return (QValue) execute(new Callable() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue 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() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(double)", new Object[]{value});
     }
 
     @Override
     public QValue create(final long value) throws RepositoryException {
-        return (QValue) execute(new Callable() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(long)", new Object[]{value});
     }
 
     @Override
     public QValue create(final boolean value) throws RepositoryException {
-        return (QValue) execute(new Callable() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(boolean)", new Object[]{value});
     }
 
     @Override
     public QValue create(final Name value) throws RepositoryException {
-        return (QValue) execute(new Callable() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue 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() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue 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() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue 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() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue 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() {
+        return execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 return qValueFactory.create(value);
             }}, "create(byte[])", new Object[]{value});
     }
@@ -150,9 +150,9 @@ public class QValueFactoryLogger extends
         Object[] args = new Object[]{value};
         final IOException[] ex = new IOException[1];
 
-        QValue result = (QValue) execute(new Callable() {
+        QValue result = execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 try {
                     return qValueFactory.create(value);
                 }
@@ -175,9 +175,9 @@ public class QValueFactoryLogger extends
         Object[] args = new Object[]{value};
         final IOException[] ex = new IOException[1];
 
-        QValue result = (QValue) execute(new Callable() {
+        QValue result = execute(new Callable<QValue>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue call() throws RepositoryException {
                 try {
                     return qValueFactory.create(value);
                 }
@@ -196,9 +196,9 @@ public class QValueFactoryLogger extends
 
     @Override
     public QValue[] computeAutoValues(final QPropertyDefinition propertyDefinition) throws RepositoryException {
-        return (QValue[]) execute(new Callable() {
+        return execute(new Callable<QValue[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValue[] call() throws RepositoryException {
                 return qValueFactory.computeAutoValues(propertyDefinition);
             }}, "computeAutoValues(QPropertyDefinition)", new Object[]{propertyDefinition});
     }

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -74,9 +74,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public NameFactory getNameFactory() throws RepositoryException {
-        return (NameFactory) execute(new Callable() {
+        return execute(new Callable<NameFactory>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NameFactory call() throws RepositoryException {
                 return service.getNameFactory();
             }
         }, "getNameFactory()", new Object[]{});
@@ -84,9 +84,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public PathFactory getPathFactory() throws RepositoryException {
-        return (PathFactory) execute(new Callable() {
+        return execute(new Callable<PathFactory>() {
             @Override
-            public Object call() throws RepositoryException {
+            public PathFactory call() throws RepositoryException {
                 return service.getPathFactory();
             }
         }, "getPathFactory()", new Object[]{});
@@ -94,9 +94,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public IdFactory getIdFactory() throws RepositoryException {
-        return (IdFactory) execute(new Callable() {
+        return execute(new Callable<IdFactory>() {
             @Override
-            public Object call() throws RepositoryException {
+            public IdFactory call() throws RepositoryException {
                 return service.getIdFactory();
             }
         }, "getIdFactory()", new Object[]{});
@@ -104,9 +104,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public QValueFactory getQValueFactory() throws RepositoryException {
-        return (QValueFactory) execute(new Callable() {
+        return execute(new Callable<QValueFactory>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QValueFactory call() throws RepositoryException {
                 return service.getQValueFactory();
             }
         }, "getQValueFactory()", new Object[]{});
@@ -114,9 +114,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Map<String, QValue[]> getRepositoryDescriptors() throws RepositoryException {
-        return (Map<String, QValue[]>) execute(new Callable() {
+        return execute(new Callable<Map<String, QValue[]>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Map<String, QValue[]> call() throws RepositoryException {
                 return service.getRepositoryDescriptors();
             }
         }, "getRepositoryDescriptors()", new Object[]{});
@@ -124,9 +124,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public ItemInfoCache getItemInfoCache(final SessionInfo sessionInfo) throws RepositoryException {
-        return (ItemInfoCache) execute(new Callable() {
+        return execute(new Callable<ItemInfoCache>() {
             @Override
-            public Object call() throws RepositoryException {
+            public ItemInfoCache call() throws RepositoryException {
                 return service.getItemInfoCache(sessionInfo);
             }
         }, "getItemInfoCache(SessionInfo)", new Object[]{sessionInfo});
@@ -136,9 +136,9 @@ public class RepositoryServiceLogger ext
     public SessionInfo obtain(final Credentials credentials, final String workspaceName)
             throws RepositoryException {
 
-        return (SessionInfo) execute(new Callable() {
+        return execute(new Callable<SessionInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public SessionInfo call() throws RepositoryException {
                 return service.obtain(credentials, workspaceName);
             }
         }, "obtain(Credentials, String)", new Object[]{credentials, workspaceName});
@@ -148,9 +148,9 @@ public class RepositoryServiceLogger ext
     public SessionInfo obtain(final SessionInfo sessionInfo, final String workspaceName)
             throws RepositoryException {
 
-        return (SessionInfo) execute(new Callable() {
+        return execute(new Callable<SessionInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public SessionInfo call() throws RepositoryException {
                 return service.obtain(unwrap(sessionInfo), workspaceName);
             }
         }, "obtain(SessionInfo, String)", new Object[]{unwrap(sessionInfo), workspaceName});
@@ -160,9 +160,9 @@ public class RepositoryServiceLogger ext
     public SessionInfo impersonate(final SessionInfo sessionInfo, final Credentials credentials)
             throws RepositoryException {
 
-        return (SessionInfo) execute(new Callable() {
+        return execute(new Callable<SessionInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public SessionInfo call() throws RepositoryException {
                 return service.impersonate(unwrap(sessionInfo), credentials);
             }
         }, "impersonate(SessionInfo, Credentials)", new Object[]{unwrap(sessionInfo), credentials});
@@ -170,7 +170,7 @@ public class RepositoryServiceLogger ext
 
     @Override
     public void dispose(final SessionInfo sessionInfo) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.dispose(unwrap(sessionInfo));
@@ -181,9 +181,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public String[] getWorkspaceNames(final SessionInfo sessionInfo) throws RepositoryException {
-        return (String[]) execute(new Callable() {
+        return execute(new Callable<String[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String[] call() throws RepositoryException {
                 return service.getWorkspaceNames(unwrap(sessionInfo));
             }
         }, "getWorkspaceNames(SessionInfo)", new Object[]{unwrap(sessionInfo)});
@@ -193,9 +193,9 @@ public class RepositoryServiceLogger ext
     public boolean isGranted(final SessionInfo sessionInfo, final ItemId itemId, final String[] actions)
             throws RepositoryException {
 
-        return (Boolean) execute(new Callable() {
+        return execute(new Callable<Boolean>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Boolean call() throws RepositoryException {
                 return service.isGranted(unwrap(sessionInfo), itemId, actions);
             }
         }, "isGranted(SessionInfo, ItemId, String[])", new Object[] { unwrap(sessionInfo), itemId, actions });
@@ -205,9 +205,9 @@ public class RepositoryServiceLogger ext
     public QNodeDefinition getNodeDefinition(final SessionInfo sessionInfo, final NodeId nodeId)
             throws RepositoryException {
 
-        return (QNodeDefinition) execute(new Callable() {
+        return execute(new Callable<QNodeDefinition>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QNodeDefinition call() throws RepositoryException {
                 return service.getNodeDefinition(unwrap(sessionInfo), nodeId);
             }
         }, "getNodeDefinition(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
@@ -217,9 +217,9 @@ public class RepositoryServiceLogger ext
     public QPropertyDefinition getPropertyDefinition(final SessionInfo sessionInfo,
             final PropertyId propertyId) throws RepositoryException {
 
-        return (QPropertyDefinition) execute(new Callable() {
+        return execute(new Callable<QPropertyDefinition>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QPropertyDefinition call() throws RepositoryException {
                 return service.getPropertyDefinition(unwrap(sessionInfo), propertyId);
             }
         }, "getPropertyDefinition(SessionInfo, PropertyId)", new Object[]{unwrap(sessionInfo), propertyId});
@@ -229,9 +229,9 @@ public class RepositoryServiceLogger ext
     public Iterator<? extends ItemInfo> getItemInfos(final SessionInfo sessionInfo, final ItemId itemId)
             throws RepositoryException {
 
-        return (Iterator<? extends ItemInfo>) execute(new Callable() {
+        return execute(new Callable<Iterator<? extends ItemInfo>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<? extends ItemInfo> call() throws RepositoryException {
                 return service.getItemInfos(unwrap(sessionInfo), itemId);
             }
         }, "getItemInfos(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), itemId});
@@ -241,9 +241,9 @@ public class RepositoryServiceLogger ext
     public Iterator<ChildInfo> getChildInfos(final SessionInfo sessionInfo, final NodeId parentId)
             throws RepositoryException {
 
-        return (Iterator<ChildInfo>) execute(new Callable() {
+        return execute(new Callable<Iterator<ChildInfo>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<ChildInfo> call() throws RepositoryException {
                 return service.getChildInfos(unwrap(sessionInfo), parentId);
             }
         }, "getChildInfos(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), parentId});
@@ -251,9 +251,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Iterator<PropertyId> getReferences(final SessionInfo sessionInfo, final NodeId nodeId, final Name propertyName, final boolean weakReferences) throws RepositoryException {
-        return (Iterator<PropertyId>) execute(new Callable() {
+        return execute(new Callable<Iterator<PropertyId>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<PropertyId> call() throws RepositoryException {
                 return service.getReferences(unwrap(sessionInfo), nodeId, propertyName, weakReferences);
             }
         }, "getReferences(SessionInfo, NodeId, Name, boolean)", new Object[]{unwrap(sessionInfo), nodeId, propertyName, weakReferences});
@@ -261,9 +261,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Batch createBatch(final SessionInfo sessionInfo, final ItemId itemId) throws RepositoryException {
-        return (Batch) execute(new Callable() {
+        return execute(new Callable<Batch>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Batch call() throws RepositoryException {
                 return service.createBatch(unwrap(sessionInfo), itemId);
             }
         }, "createBatch(SessionInfo, ItemId)", new Object[]{unwrap(sessionInfo), itemId});
@@ -272,7 +272,7 @@ public class RepositoryServiceLogger ext
     @Override
     public void submit(final Batch batch) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.submit(unwrap(batch));
@@ -285,7 +285,7 @@ public class RepositoryServiceLogger ext
     public void importXml(final SessionInfo sessionInfo, final NodeId parentId, final InputStream xmlStream,
             final int uuidBehaviour) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.importXml(unwrap(sessionInfo), parentId, xmlStream, uuidBehaviour);
@@ -299,7 +299,7 @@ public class RepositoryServiceLogger ext
     public void move(final SessionInfo sessionInfo, final NodeId srcNodeId, final NodeId destParentNodeId,
             final Name destName) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.move(unwrap(sessionInfo), srcNodeId, destParentNodeId, destName);
@@ -313,7 +313,7 @@ public class RepositoryServiceLogger ext
     public void copy(final SessionInfo sessionInfo, final String srcWorkspaceName, final NodeId srcNodeId,
             final NodeId destParentNodeId, final Name destName) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.copy(unwrap(sessionInfo), srcWorkspaceName, srcNodeId, destParentNodeId, destName);
@@ -327,7 +327,7 @@ public class RepositoryServiceLogger ext
     public void update(final SessionInfo sessionInfo, final NodeId nodeId, final String srcWorkspaceName)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.update(unwrap(sessionInfo), nodeId, srcWorkspaceName);
@@ -341,7 +341,7 @@ public class RepositoryServiceLogger ext
             final NodeId destParentNodeId, final Name destName, final boolean removeExisting)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.clone(unwrap(sessionInfo), srcWorkspaceName, srcNodeId, destParentNodeId, destName,
@@ -356,9 +356,9 @@ public class RepositoryServiceLogger ext
     public LockInfo getLockInfo(final SessionInfo sessionInfo, final NodeId nodeId)
             throws RepositoryException {
 
-        return (LockInfo) execute(new Callable() {
+        return execute(new Callable<LockInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public LockInfo call() throws RepositoryException {
                 return service.getLockInfo(unwrap(sessionInfo), nodeId);
             }
         }, "getLockInfo(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
@@ -368,9 +368,9 @@ public class RepositoryServiceLogger ext
     public LockInfo lock(final SessionInfo sessionInfo, final NodeId nodeId, final boolean deep,
             final boolean sessionScoped) throws RepositoryException {
 
-        return (LockInfo) execute(new Callable() {
+        return execute(new Callable<LockInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public LockInfo call() throws RepositoryException {
                 return service.lock(unwrap(sessionInfo), nodeId, deep, sessionScoped);
             }
         }, "lock(SessionInfo, NodeId, boolean, boolean)",
@@ -382,9 +382,9 @@ public class RepositoryServiceLogger ext
             final boolean sessionScoped, final long timeoutHint, final String ownerHint)
             throws RepositoryException {
 
-        return (LockInfo) execute(new Callable() {
+        return execute(new Callable<LockInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public LockInfo call() throws RepositoryException {
                 return service.lock(unwrap(sessionInfo), nodeId, deep, sessionScoped, timeoutHint, ownerHint);
             }
         }, "lock(SessionInfo, NodeId, boolean, boolean, long, String)",
@@ -397,7 +397,7 @@ public class RepositoryServiceLogger ext
     public void refreshLock(final SessionInfo sessionInfo, final NodeId nodeId)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.refreshLock(unwrap(sessionInfo), nodeId);
@@ -410,7 +410,7 @@ public class RepositoryServiceLogger ext
     public void unlock(final SessionInfo sessionInfo, final NodeId nodeId)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.unlock(unwrap(sessionInfo), nodeId);
@@ -422,9 +422,9 @@ public class RepositoryServiceLogger ext
     @Override
     public NodeId checkin(final SessionInfo sessionInfo, final NodeId nodeId) throws RepositoryException {
 
-        return (NodeId) execute(new Callable() {
+        return execute(new Callable<NodeId>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NodeId call() throws RepositoryException {
                 return service.checkin(unwrap(sessionInfo), nodeId);
             }
         }, "checkin(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
@@ -434,7 +434,7 @@ public class RepositoryServiceLogger ext
     public void checkout(final SessionInfo sessionInfo, final NodeId nodeId)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.checkout(unwrap(sessionInfo), nodeId);
@@ -447,7 +447,7 @@ public class RepositoryServiceLogger ext
     public void checkout(final SessionInfo sessionInfo, final NodeId nodeId, final NodeId activityId)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.checkout(unwrap(sessionInfo), nodeId, activityId);
@@ -458,9 +458,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public NodeId checkpoint(final SessionInfo sessionInfo, final NodeId nodeId) throws RepositoryException {
-        return (NodeId) execute(new Callable() {
+        return execute(new Callable<NodeId>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NodeId call() throws RepositoryException {
                 return service.checkpoint(unwrap(sessionInfo), nodeId);
             }
         }, "checkpoint(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
@@ -468,9 +468,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public NodeId checkpoint(final SessionInfo sessionInfo, final NodeId nodeId, final NodeId activityId) throws RepositoryException {
-        return (NodeId) execute(new Callable() {
+        return execute(new Callable<NodeId>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NodeId call() throws RepositoryException {
                 return service.checkpoint(unwrap(sessionInfo), nodeId, activityId);
             }
         }, "checkpoint(SessionInfo, NodeId, NodeId)", new Object[]{unwrap(sessionInfo), nodeId, activityId});
@@ -480,7 +480,7 @@ public class RepositoryServiceLogger ext
     public void removeVersion(final SessionInfo sessionInfo, final NodeId versionHistoryId,
             final NodeId versionId) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.removeVersion(unwrap(sessionInfo), versionHistoryId, versionId);
@@ -494,7 +494,7 @@ public class RepositoryServiceLogger ext
     public void restore(final SessionInfo sessionInfo, final NodeId nodeId, final NodeId versionId,
             final boolean removeExisting) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.restore(unwrap(sessionInfo), nodeId, versionId, removeExisting);
@@ -508,7 +508,7 @@ public class RepositoryServiceLogger ext
     public void restore(final SessionInfo sessionInfo, final NodeId[] nodeIds, final boolean removeExisting)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.restore(unwrap(sessionInfo), nodeIds, removeExisting);
@@ -522,9 +522,9 @@ public class RepositoryServiceLogger ext
     public Iterator<NodeId> merge(final SessionInfo sessionInfo, final NodeId nodeId, final String srcWorkspaceName,
             final boolean bestEffort) throws RepositoryException {
 
-        return (Iterator<NodeId>) execute(new Callable() {
+        return execute(new Callable<Iterator<NodeId>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<NodeId> call() throws RepositoryException {
                 return service.merge(unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort);
             }
         }, "merge(SessionInfo, NodeId, String, boolean)",
@@ -535,9 +535,9 @@ public class RepositoryServiceLogger ext
     public Iterator<NodeId> merge(final SessionInfo sessionInfo, final NodeId nodeId, final String srcWorkspaceName,
             final boolean bestEffort, final boolean isShallow) throws RepositoryException {
 
-        return (Iterator<NodeId>) execute(new Callable() {
+        return execute(new Callable<Iterator<NodeId>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<NodeId> call() throws RepositoryException {
                 return service.merge(unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort, isShallow);
             }
         }, "merge(SessionInfo, NodeId, String, boolean, boolean)",
@@ -548,7 +548,7 @@ public class RepositoryServiceLogger ext
     public void resolveMergeConflict(final SessionInfo sessionInfo, final NodeId nodeId,
             final NodeId[] mergeFailedIds, final NodeId[] predecessorIds) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.resolveMergeConflict(unwrap(sessionInfo), nodeId, mergeFailedIds, predecessorIds);
@@ -562,7 +562,7 @@ public class RepositoryServiceLogger ext
     public void addVersionLabel(final SessionInfo sessionInfo, final NodeId versionHistoryId,
             final NodeId versionId, final Name label, final boolean moveLabel) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.addVersionLabel(unwrap(sessionInfo), versionHistoryId, versionId, label, moveLabel);
@@ -576,7 +576,7 @@ public class RepositoryServiceLogger ext
     public void removeVersionLabel(final SessionInfo sessionInfo, final NodeId versionHistoryId,
             final NodeId versionId, final Name label) throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.removeVersionLabel(unwrap(sessionInfo), versionHistoryId, versionId, label);
@@ -588,9 +588,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public NodeId createActivity(final SessionInfo sessionInfo, final String title) throws RepositoryException {
-        return (NodeId) execute(new Callable() {
+        return execute(new Callable<NodeId>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NodeId call() throws RepositoryException {
                 return service.createActivity(unwrap(sessionInfo), title);
             }
         }, "createActivity(SessionInfo, String)", new Object[]{unwrap(sessionInfo), title});
@@ -598,7 +598,7 @@ public class RepositoryServiceLogger ext
 
     @Override
     public void removeActivity(final SessionInfo sessionInfo, final NodeId activityId) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.removeActivity(unwrap(sessionInfo), activityId);
@@ -610,9 +610,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Iterator<NodeId> mergeActivity(final SessionInfo sessionInfo, final NodeId activityId) throws RepositoryException {
-        return (Iterator<NodeId>) execute(new Callable() {
+        return execute(new Callable<Iterator<NodeId>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<NodeId> call() throws RepositoryException {
                 return service.mergeActivity(unwrap(sessionInfo), activityId);
             }
         }, "mergeActivity(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), activityId});
@@ -620,9 +620,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public NodeId createConfiguration(final SessionInfo sessionInfo, final NodeId nodeId) throws RepositoryException {
-        return (NodeId) execute(new Callable() {
+        return execute(new Callable<NodeId>() {
             @Override
-            public Object call() throws RepositoryException {
+            public NodeId call() throws RepositoryException {
                 return service.createConfiguration(unwrap(sessionInfo), nodeId);
             }
         }, "createConfiguration(SessionInfo, NodeId, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
@@ -630,9 +630,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public String[] getSupportedQueryLanguages(final SessionInfo sessionInfo) throws RepositoryException {
-        return (String[]) execute(new Callable() {
+        return execute(new Callable<String[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String[] call() throws RepositoryException {
                 return service.getSupportedQueryLanguages(unwrap(sessionInfo));
             }
         }, "getSupportedQueryLanguages(SessionInfo)", new Object[]{unwrap(sessionInfo)});
@@ -642,9 +642,9 @@ public class RepositoryServiceLogger ext
     public String[] checkQueryStatement(final SessionInfo sessionInfo, final String statement,
             final String language, final Map<String, String> namespaces) throws RepositoryException {
 
-        return (String[]) execute(new Callable() {
+        return execute(new Callable<String[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String[] call() throws RepositoryException {
                 return service.checkQueryStatement(unwrap(sessionInfo), statement, language, namespaces);
             }
         }, "checkQueryStatement(SessionInfo, String, String, Map)",
@@ -655,9 +655,9 @@ public class RepositoryServiceLogger ext
     public QueryInfo executeQuery(final SessionInfo sessionInfo, final String statement,
                                   final String language, final Map<String, String> namespaces, final long limit, final long offset, final Map<String, QValue> values) throws RepositoryException {
 
-        return (QueryInfo) execute(new Callable() {
+        return execute(new Callable<QueryInfo>() {
             @Override
-            public Object call() throws RepositoryException {
+            public QueryInfo call() throws RepositoryException {
                 return service.executeQuery(unwrap(sessionInfo), statement, language, namespaces, limit, offset, values);
             }
         }, "executeQuery(SessionInfo, String, String, Map, long, long, Map)",
@@ -669,9 +669,9 @@ public class RepositoryServiceLogger ext
             final Path absPath, final boolean isDeep, final String[] uuid, final Name[] qNodeTypeName,
             final boolean noLocal) throws RepositoryException {
 
-        return (EventFilter) execute(new Callable() {
+        return execute(new Callable<EventFilter>() {
             @Override
-            public Object call() throws RepositoryException {
+            public EventFilter call() throws RepositoryException {
                 return service.createEventFilter(unwrap(sessionInfo), eventTypes, absPath, isDeep, uuid,
                        qNodeTypeName, noLocal);
             }
@@ -682,9 +682,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public ExecutorService getChangePollingExecutor() throws RepositoryException {
-        return (ExecutorService) execute(new Callable() {
+        return execute(new Callable<ExecutorService>() {
             @Override
-            public Object call() throws RepositoryException {
+            public ExecutorService call() throws RepositoryException {
                 return service.getChangePollingExecutor();
             }
         }, "getChangePollingExecutor()", new Object[]{});
@@ -694,9 +694,9 @@ public class RepositoryServiceLogger ext
     public Subscription createSubscription(final SessionInfo sessionInfo, final EventFilter[] filters)
             throws RepositoryException {
 
-        return (Subscription) execute(new Callable() {
+        return execute(new Callable<Subscription>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Subscription call() throws RepositoryException {
                 return service.createSubscription(unwrap(sessionInfo), filters);
             }
         }, "createSubscription(SessionInfo, EventFilter[])",
@@ -711,9 +711,9 @@ public class RepositoryServiceLogger ext
         final Object[] args = new Object[]{subscription, timeout};
         final InterruptedException[] ex = new InterruptedException[1];
 
-        EventBundle[] result = (EventBundle[]) execute(new Callable() {
+        EventBundle[] result = execute(new Callable<EventBundle[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public EventBundle[] call() throws RepositoryException {
                 try {
                     return service.getEvents(subscription, timeout);
                 } catch (InterruptedException e) {
@@ -732,12 +732,12 @@ public class RepositoryServiceLogger ext
     }
 
     @Override
-    public EventBundle getEvents(final SessionInfo sessionInfo,
-                                 final EventFilter filter,
-                                 final long after) throws RepositoryException {
-        return (EventBundle) execute(new Callable() {
+    public EventBundle getEvents(final SessionInfo sessionInfo, final EventFilter filter, final long after)
+            throws RepositoryException {
+        
+        return execute(new Callable<EventBundle>() {
             @Override
-            public Object call() throws RepositoryException {
+            public EventBundle call() throws RepositoryException {
                 return service.getEvents(sessionInfo, filter, after);
             }
         }, "getEvents(SessionInfo, EventFilter, long)",
@@ -748,7 +748,7 @@ public class RepositoryServiceLogger ext
     public void updateEventFilters(final Subscription subscription, final EventFilter[] eventFilters)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.updateEventFilters(subscription, eventFilters);
@@ -760,7 +760,7 @@ public class RepositoryServiceLogger ext
 
     @Override
     public void dispose(final Subscription subscription) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.dispose(subscription);
@@ -771,32 +771,29 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Map<String, String> getRegisteredNamespaces(final SessionInfo sessionInfo) throws RepositoryException {
-        return (Map<String, String>) execute(new Callable() {
+        return execute(new Callable<Map<String, String>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Map<String, String> call() throws RepositoryException {
                 return service.getRegisteredNamespaces(unwrap(sessionInfo));
             }
         }, "getRegisteredNamespaces(SessionInfo)", new Object[]{unwrap(sessionInfo)});
     }
 
     @Override
-    public String getNamespaceURI(final SessionInfo sessionInfo, final String prefix)
-            throws RepositoryException {
-        return (String) execute(new Callable() {
+    public String getNamespaceURI(final SessionInfo sessionInfo, final String prefix) throws RepositoryException {
+        return execute(new Callable<String>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String call() throws RepositoryException {
                 return service.getNamespaceURI(unwrap(sessionInfo), prefix);
             }
         }, "getNamespaceURI(SessionInfo, String)", new Object[]{unwrap(sessionInfo), prefix});
     }
 
     @Override
-    public String getNamespacePrefix(final SessionInfo sessionInfo, final String uri)
-            throws RepositoryException {
-
-        return (String) execute(new Callable() {
+    public String getNamespacePrefix(final SessionInfo sessionInfo, final String uri) throws RepositoryException {
+        return execute(new Callable<String>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String call() throws RepositoryException {
                 return service.getNamespacePrefix(unwrap(sessionInfo), uri);
             }
         }, "getNamespacePrefix(SessionInfo, String)", new Object[]{unwrap(sessionInfo), uri});
@@ -806,7 +803,7 @@ public class RepositoryServiceLogger ext
     public void registerNamespace(final SessionInfo sessionInfo, final String prefix, final String uri)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.registerNamespace(unwrap(sessionInfo), prefix, uri);
@@ -819,7 +816,7 @@ public class RepositoryServiceLogger ext
     public void unregisterNamespace(final SessionInfo sessionInfo, final String uri)
             throws RepositoryException {
 
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.unregisterNamespace(unwrap(sessionInfo), uri);
@@ -830,9 +827,9 @@ public class RepositoryServiceLogger ext
 
     @Override
     public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(final SessionInfo sessionInfo) throws RepositoryException {
-        return (Iterator<QNodeTypeDefinition>) execute(new Callable() {
+        return execute(new Callable<Iterator<QNodeTypeDefinition>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<QNodeTypeDefinition> call() throws RepositoryException {
                 return service.getQNodeTypeDefinitions(unwrap(sessionInfo));
             }
         }, "getQNodeTypeDefinitions(SessionInfo)", new Object[]{unwrap(sessionInfo)});
@@ -842,28 +839,31 @@ public class RepositoryServiceLogger ext
     public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(final SessionInfo sessionInfo, final Name[] nodetypeNames)
             throws RepositoryException {
 
-        return (Iterator) execute(new Callable() {
+        return execute(new Callable<Iterator<QNodeTypeDefinition>>() {
             @Override
-            public Object call() throws RepositoryException {
+            public Iterator<QNodeTypeDefinition> call() throws RepositoryException {
                 return service.getQNodeTypeDefinitions(unwrap(sessionInfo), nodetypeNames);
             }
         }, "getQNodeTypeDefinitions(SessionInfo, Name[])", new Object[]{unwrap(sessionInfo), nodetypeNames});
     }
 
     @Override
-    public void registerNodeTypes(final SessionInfo sessionInfo, final QNodeTypeDefinition[] nodeTypeDefinitions, final boolean allowUpdate) throws RepositoryException {
-        execute(new Callable() {
+    public void registerNodeTypes(final SessionInfo sessionInfo, final QNodeTypeDefinition[] nodeTypeDefinitions,
+            final boolean allowUpdate) throws RepositoryException {
+
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.registerNodeTypes(unwrap(sessionInfo), nodeTypeDefinitions, allowUpdate);
                 return null;
             }
-        }, "registerNodeTypes(SessionInfo, QNodeTypeDefinition[], boolean)", new Object[]{unwrap(sessionInfo), nodeTypeDefinitions, allowUpdate});
+        }, "registerNodeTypes(SessionInfo, QNodeTypeDefinition[], boolean)", new Object[]{unwrap(sessionInfo),
+                nodeTypeDefinitions, allowUpdate});
     }
 
     @Override
     public void unregisterNodeTypes(final SessionInfo sessionInfo, final Name[] nodeTypeNames) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.unregisterNodeTypes(unwrap(sessionInfo), nodeTypeNames);
@@ -873,8 +873,10 @@ public class RepositoryServiceLogger ext
     }
 
     @Override
-    public void createWorkspace(final SessionInfo sessionInfo, final String name, final String srcWorkspaceName) throws RepositoryException {
-        execute(new Callable() {
+    public void createWorkspace(final SessionInfo sessionInfo, final String name, final String srcWorkspaceName)
+            throws RepositoryException {
+        
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.createWorkspace(unwrap(sessionInfo), name, srcWorkspaceName);
@@ -885,7 +887,7 @@ public class RepositoryServiceLogger ext
 
     @Override
     public void deleteWorkspace(final SessionInfo sessionInfo, final String name) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 service.deleteWorkspace(unwrap(sessionInfo), name);

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=1166240&r1=1166239&r2=1166240&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 15:54:44 2011
@@ -48,9 +48,9 @@ public class SessionInfoLogger extends A
 
     @Override
     public String getUserID() {
-        return (String) execute(new SafeCallable() {
+        return execute(new SafeCallable<String>() {
             @Override
-            public Object call() {
+            public String call() {
                 return sessionInfo.getUserID();
             }
         }, "getUserID()", new Object[]{});
@@ -58,9 +58,9 @@ public class SessionInfoLogger extends A
 
     @Override
     public String getWorkspaceName() {
-        return (String) execute(new SafeCallable() {
+        return execute(new SafeCallable<String>() {
             @Override
-            public Object call() {
+            public String call() {
                 return sessionInfo.getWorkspaceName();
             }
         }, "getWorkspaceName()", new Object[]{});
@@ -68,9 +68,9 @@ public class SessionInfoLogger extends A
 
     @Override
     public String[] getLockTokens() throws RepositoryException {
-        return (String[]) execute(new Callable() {
+        return execute(new Callable<String[]>() {
             @Override
-            public Object call() throws RepositoryException {
+            public String[] call() throws RepositoryException {
                 return sessionInfo.getLockTokens();
             }
         }, "getLockTokens()", new Object[]{});
@@ -78,7 +78,7 @@ public class SessionInfoLogger extends A
 
     @Override
     public void addLockToken(final String lockToken) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 sessionInfo.addLockToken(lockToken);
@@ -89,7 +89,7 @@ public class SessionInfoLogger extends A
 
     @Override
     public void removeLockToken(final String lockToken) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 sessionInfo.removeLockToken(lockToken);
@@ -100,7 +100,7 @@ public class SessionInfoLogger extends A
 
     @Override
     public void setUserData(final String userData) throws RepositoryException {
-        execute(new Callable() {
+        execute(new Callable<Object>() {
             @Override
             public Object call() throws RepositoryException {
                 sessionInfo.setUserData(userData);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java?rev=1166240&r1=1166239&r2=1166240&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/namespace/NamespaceAdder.java Wed Sep  7 15:54:44 2011
@@ -30,12 +30,9 @@ public class NamespaceAdder {
     }
 
     public void addNamespaces(NamespaceMapping nsm) throws RepositoryException {
-        Map m = nsm.getPrefixToURIMapping();
-        for (Object o : m.entrySet()) {
-            Entry e = (Entry) o;
-            String prefix = (String) e.getKey();
-            String uri = (String) e.getValue();
-            registry.registerNamespace(prefix, uri);
+        Map<String, String> m = nsm.getPrefixToURIMapping();
+        for (Entry<String, String> e : m.entrySet()) {
+            registry.registerNamespace(e.getKey(), e.getValue());
         }
     }
 



Mime
View raw message