jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1569336 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/ oak-core/...
Date Tue, 18 Feb 2014 14:16:38 GMT
Author: angela
Date: Tue Feb 18 14:16:37 2014
New Revision: 1569336

URL: http://svn.apache.org/r1569336
Log:
minor improvement

- remove unused code
- cleanup TODOs
- remove unused import

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ImmutableRoot.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/MongoStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/ACL.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/TreeTypeProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/MoveTracker.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/SubtreeExcludingValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/SystemSubject.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/CompositeAuthorizationConfiguration.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/CompositeRestrictionProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/PrincipalIteratorAdapter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeBits.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/ImmutableRootTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/user/LoginModuleImplTest.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/AuthorizableDelegator.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/TargetImportHandler.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlImporterTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportWithActionsTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ImmutableRoot.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ImmutableRoot.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ImmutableRoot.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ImmutableRoot.java
Tue Feb 18 14:16:37 2014
@@ -18,11 +18,7 @@
  */
 package org.apache.jackrabbit.oak.core;
 
-import static com.google.common.base.Preconditions.checkArgument;
-import static org.apache.jackrabbit.oak.commons.PathUtils.elements;
-
 import java.io.InputStream;
-
 import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.api.Blob;
@@ -36,6 +32,9 @@ import org.apache.jackrabbit.oak.query.E
 import org.apache.jackrabbit.oak.query.QueryEngineImpl;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static org.apache.jackrabbit.oak.commons.PathUtils.elements;
+
 /**
  * Simple implementation of the Root interface that only supports simple read
  * operations based on the {@code NodeState} (or {@code ImmutableTree})
@@ -83,10 +82,6 @@ public final class ImmutableRoot impleme
         throw new UnsupportedOperationException();
     }
 
-    public boolean copy(String sourcePath, String destPath) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public void rebase() {
         throw new UnsupportedOperationException();

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
Tue Feb 18 14:16:37 2014
@@ -16,17 +16,7 @@
  */
 package org.apache.jackrabbit.oak.plugins.nodetype;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.contains;
-import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.oak.api.Type.STRING;
-import static org.apache.jackrabbit.oak.commons.PathUtils.dropIndexFromName;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
-
 import java.util.List;
-
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.jcr.Node;
@@ -51,12 +41,18 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.commons.PathUtils;
-import org.apache.jackrabbit.oak.plugins.tree.ImmutableTree;
 import org.apache.jackrabbit.oak.namepath.NameMapper;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.namepath.NamePathMapperImpl;
-import org.apache.jackrabbit.oak.spi.state.NodeState;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.contains;
+import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
+import static org.apache.jackrabbit.oak.api.Type.STRING;
+import static org.apache.jackrabbit.oak.commons.PathUtils.dropIndexFromName;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
 
 /**
  * Base implementation of a {@link NodeTypeManager} with support for reading
@@ -136,29 +132,6 @@ public abstract class ReadOnlyNodeTypeMa
         };
     }
 
-    /**
-     * Returns a read-only node type manager based on the types stored within
-     * the content tree starting at the given root node state.
-     *
-     * @param root root node state
-     * @return read-only node type manager
-     */
-    @Nonnull
-    public static ReadOnlyNodeTypeManager getInstance(NodeState root) {
-        NodeState typesNode = root;
-        for (String name : PathUtils.elements(NODE_TYPES_PATH)) {
-            typesNode = typesNode.getChildNode(name);
-        }
-
-        final Tree typesTree = new ImmutableTree(typesNode);
-        return new ReadOnlyNodeTypeManager() {
-            @Override
-            protected Tree getTypes() {
-                return typesTree;
-            }
-        };
-    }
-
     //----------------------------------------------------< NodeTypeManager >---
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/MongoStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/MongoStore.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/MongoStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/mongo/MongoStore.java
Tue Feb 18 14:16:37 2014
@@ -112,7 +112,7 @@ public class MongoStore extends Abstract
     @Override
     public void deleteSegment(UUID segmentId) {
         segments.remove(new BasicDBObject("_id", segmentId.toString()));
-        super.deleteSegment(segmentId);;
+        super.deleteSegment(segmentId);
     }
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeLocation.java
Tue Feb 18 14:16:37 2014
@@ -52,14 +52,6 @@ public abstract class TreeLocation {
     }
 
     /**
-     * Create a new {@code TreeLocation} instance for the specified {@code tree}
-     * and {@code property}.
-     */
-    public static TreeLocation create(@Nonnull Tree tree, @Nonnull PropertyState property)
{
-        return new PropertyLocation(tree, property.getName());
-    }
-
-    /**
      * Create a new {@code TreeLocation} instance for the item
      * at the given {@code path} in {@code root}.
      */

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManager.java
Tue Feb 18 14:16:37 2014
@@ -18,9 +18,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.version;
 
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
@@ -35,6 +32,8 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
 import org.apache.jackrabbit.oak.util.TreeUtil;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 /**
  * {@code ReadOnlyVersionManager} provides implementations for read-only
  * version operations modeled after the ones available in {@link javax.jcr.version.VersionManager}.
@@ -92,17 +91,6 @@ public abstract class ReadOnlyVersionMan
     }
 
     /**
-     * Returns {@code true} if the tree at the given absolute Oak path is
-     * checked out; otherwise {@code false}.
-     *
-     * @param absOakPath an absolute path.
-     * @return whether the tree at the given path is checked out or not.
-     */
-    public boolean isCheckedOut(@Nonnull String absOakPath) {
-        return isCheckedOut(getWorkspaceRoot().getTree(checkNotNull(absOakPath)));
-    }
-
-    /**
      * Returns the tree representing the version history of the given
      * versionable tree or {@code null} if none exists yet.
      *

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/ACL.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/ACL.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/ACL.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/ACL.java
Tue Feb 18 14:16:37 2014
@@ -35,14 +35,12 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
-import org.apache.jackrabbit.api.security.principal.PrincipalManager;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.ACE;
 import org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlList;
 import org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction;
 import org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBits;
-import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBitsProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/TreeTypeProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/TreeTypeProvider.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/TreeTypeProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/TreeTypeProvider.java
Tue Feb 18 14:16:37 2014
@@ -44,8 +44,6 @@ import org.apache.jackrabbit.oak.spi.sta
  */
 public final class TreeTypeProvider {
 
-    public static final int TYPE_NONE = 0;
-
     // regular trees
     public static final int TYPE_DEFAULT = 1;
     // version store(s) content

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/MoveTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/MoveTracker.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/MoveTracker.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/MoveTracker.java
Tue Feb 18 14:16:37 2014
@@ -116,9 +116,5 @@ public class MoveTracker {
             parentSourcePaths.add(Text.getRelativeParent(sourcePath, 1));
             parentDestPaths.add(Text.getRelativeParent(destPath, 1));
         }
-
-        private void updateDestPath(@Nonnull String destPath) {
-            this.destPath = destPath;
-        }
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/SubtreeExcludingValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/SubtreeExcludingValidator.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/SubtreeExcludingValidator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/SubtreeExcludingValidator.java
Tue Feb 18 14:16:37 2014
@@ -18,16 +18,15 @@
  */
 package org.apache.jackrabbit.oak.spi.commit;
 
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.Arrays;
 import java.util.List;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
 /**
  * Validator that excludes a subtree from the validation process and delegates
  * validation of other changes to another given validator.
@@ -43,10 +42,6 @@ public class SubtreeExcludingValidator e
 
     private final List<String> tail;
 
-    public SubtreeExcludingValidator(Validator validator, String... path) {
-        this(validator, Arrays.asList(path));
-    }
-
     protected SubtreeExcludingValidator(Validator validator, List<String> path) {
         this.validator = checkNotNull(validator);
         checkNotNull(path);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/SystemSubject.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/SystemSubject.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/SystemSubject.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/SystemSubject.java
Tue Feb 18 14:16:37 2014
@@ -38,9 +38,8 @@ public final class SystemSubject {
     private SystemSubject() {}
 
     private static Subject createSystemSubject() {
-        // TODO: workaround for OAK-1404
         Set<? extends Principal> principals = Collections.singleton(SystemPrincipal.INSTANCE);
-        AuthInfo info = new AuthInfoImpl("system", null, principals);
+        AuthInfo info = new AuthInfoImpl(SystemPrincipal.INSTANCE.getName(), null, principals);
         return new Subject(true, principals, Collections.singleton(info), Collections.<Object>emptySet());
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/CompositeAuthorizationConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/CompositeAuthorizationConfiguration.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/CompositeAuthorizationConfiguration.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/CompositeAuthorizationConfiguration.java
Tue Feb 18 14:16:37 2014
@@ -48,7 +48,7 @@ import org.apache.jackrabbit.oak.spi.sec
  * {@link CompositeAuthorizationConfiguration} that combines different
  * authorization models. This implementation has the following characteristics:
  *
- * TODO
+ * TODO OAK-1268
  */
 public class CompositeAuthorizationConfiguration extends CompositeConfiguration<AuthorizationConfiguration>
implements AuthorizationConfiguration {
 
@@ -85,8 +85,8 @@ public class CompositeAuthorizationConfi
     @Nonnull
     @Override
     public PermissionProvider getPermissionProvider(@Nonnull Root root, @Nonnull String workspaceName,
@Nonnull Set<Principal> principals) {
-        // TODO
-        throw new UnsupportedOperationException("not yet implemented.");
+        // TODO OAK-1268
+        throw new UnsupportedOperationException("not yet implemented (OAK-1268)");
     }
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/CompositeRestrictionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/CompositeRestrictionProvider.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/CompositeRestrictionProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/CompositeRestrictionProvider.java
Tue Feb 18 14:16:37 2014
@@ -72,13 +72,13 @@ public class CompositeRestrictionProvide
 
     @Nonnull
     @Override
-    public Restriction createRestriction(@Nullable String oakPath, @Nonnull String oakName,
@Nonnull Value value) throws AccessControlException, RepositoryException {
+    public Restriction createRestriction(@Nullable String oakPath, @Nonnull String oakName,
@Nonnull Value value) throws RepositoryException {
         return getProvider(oakPath, oakName).createRestriction(oakPath, oakName, value);
     }
 
     @Nonnull
     @Override
-    public Restriction createRestriction(@Nullable String oakPath, @Nonnull String oakName,
@Nonnull Value... values) throws AccessControlException, RepositoryException {
+    public Restriction createRestriction(@Nullable String oakPath, @Nonnull String oakName,
@Nonnull Value... values) throws RepositoryException {
         return getProvider(oakPath, oakName).createRestriction(oakPath, oakName, values);
     }
 
@@ -101,7 +101,7 @@ public class CompositeRestrictionProvide
     }
 
     @Override
-    public void validateRestrictions(@Nullable String oakPath, @Nonnull Tree aceTree) throws
AccessControlException, RepositoryException {
+    public void validateRestrictions(@Nullable String oakPath, @Nonnull Tree aceTree) throws
RepositoryException {
         Map<String,RestrictionDefinition> supported = getSupported(oakPath);
         Set<String> rNames = new HashSet<String>();
         for (Restriction r : readRestrictions(oakPath, aceTree)) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/PrincipalIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/PrincipalIteratorAdapter.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/PrincipalIteratorAdapter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/PrincipalIteratorAdapter.java
Tue Feb 18 14:16:37 2014
@@ -20,7 +20,6 @@ import java.security.Principal;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import javax.jcr.RangeIterator;
 
 import org.apache.jackrabbit.api.security.principal.PrincipalIterator;
 import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter;
@@ -40,15 +39,6 @@ public class PrincipalIteratorAdapter ex
             new PrincipalIteratorAdapter((Iterator<? extends Principal>) RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link javax.jcr.RangeIterator}.
-     *
-     * @param iterator iterator of {@link java.security.Principal}s
-     */
-    public PrincipalIteratorAdapter(RangeIterator iterator) {
-        super(iterator);
-    }
-
-    /**
      * Creates an adapter for the given {@link java.util.Iterator} of principals.
      *
      * @param iterator iterator of {@link java.security.Principal}s

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeBits.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeBits.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeBits.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeBits.java
Tue Feb 18 14:16:37 2014
@@ -659,24 +659,6 @@ public final class PrivilegeBits impleme
             bits = new long[]{NO_PRIVILEGE};
         }
 
-        private ModifiableData(Data base) {
-            long[] b = base.longValues();
-            switch (b.length) {
-                case 0:
-                    // empty
-                    bits = new long[]{NO_PRIVILEGE};
-                    break;
-                case 1:
-                    // single long
-                    bits = new long[]{b[0]};
-                    break;
-                default:
-                    // copy
-                    bits = new long[b.length];
-                    System.arraycopy(b, 0, bits, 0, b.length);
-            }
-        }
-
         @Override
         boolean isEmpty() {
             return bits.length == 1 && bits[0] == NO_PRIVILEGE;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
Tue Feb 18 14:16:37 2014
@@ -18,17 +18,14 @@ package org.apache.jackrabbit.oak.util;
 
 import java.util.Arrays;
 import java.util.Calendar;
-import java.util.List;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
-import javax.jcr.ValueFactory;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.PropertyState;
@@ -85,10 +82,6 @@ public class NodeUtil {
         return new NodeUtil(tree.getParent(), mapper);
     }
 
-    public boolean isRoot() {
-        return tree.isRoot();
-    }
-
     public boolean hasChild(String name) {
         return tree.hasChild(name);
     }
@@ -185,21 +178,6 @@ public class NodeUtil {
         tree.removeProperty(name);
     }
 
-    /**
-     * Returns the boolean representation of the property with the specified
-     * {@code propertyName}. If the property does not exist or
-     * {@link org.apache.jackrabbit.oak.api.PropertyState#isArray() is an array}
-     * this method returns {@code false}.
-     *
-     * @param name The name of the property.
-     * @return the boolean representation of the property state with the given
-     *         name. This utility returns {@code false} if the property does not exist
-     *         or is an multivalued property.
-     */
-    public boolean getBoolean(String name) {
-        return TreeUtil.getBoolean(tree, name);
-    }
-
     public void setBoolean(String name, boolean value) {
         tree.setProperty(name, value);
     }
@@ -214,21 +192,11 @@ public class NodeUtil {
         tree.setProperty(name, value);
     }
 
-    @CheckForNull
-    public Iterable<String> getStrings(String name) {
-        return TreeUtil.getStrings(tree, name);
-    }
-
     public void setStrings(String name, String... values) {
         tree.setProperty(name, Arrays.asList(values), STRINGS);
     }
 
     @CheckForNull
-    public String getName(String name) {
-        return getName(name, null);
-    }
-
-    @CheckForNull
     public String getName(String name, @Nullable String defaultValue) {
         PropertyState property = tree.getProperty(name);
         if (property != null && !property.isArray()) {
@@ -243,18 +211,6 @@ public class NodeUtil {
         tree.setProperty(propertyName, oakName, NAME);
     }
 
-    @CheckForNull
-    public Iterable<String> getNames(String propertyName) {
-        return Iterables.transform(
-                TreeUtil.getNames(tree, propertyName),
-                new Function<String, String>() {
-                    @Override
-                    public String apply(String input) {
-                        return mapper.getJcrName(input);
-                    }
-                });
-    }
-
     public void setNames(String propertyName, String... values) {
         tree.setProperty(propertyName, Lists.transform(Arrays.asList(values), new Function<String,
String>() {
             @Override
@@ -279,17 +235,6 @@ public class NodeUtil {
         }
     }
 
-    @Nonnull
-    public List<NodeUtil> getNodes(String namePrefix) {
-        List<NodeUtil> nodes = Lists.newArrayList();
-        for (Tree child : tree.getChildren()) {
-            if (child.getName().startsWith(namePrefix)) {
-                nodes.add(new NodeUtil(child, mapper));
-            }
-        }
-        return nodes;
-    }
-
     public void setValues(String name, Value[] values) {
         try {
             tree.setProperty(PropertyStates.createProperty(name, Arrays.asList(values)));
@@ -298,25 +243,6 @@ public class NodeUtil {
         }
     }
 
-    @CheckForNull
-    public Value[] getValues(String name, ValueFactory vf) {
-        PropertyState property = tree.getProperty(name);
-        if (property != null) {
-            int type = property.getType().tag();
-            List<Value> values = Lists.newArrayList();
-            for (String value : property.getValue(STRINGS)) {
-                try {
-                    values.add(vf.createValue(value, type));
-                } catch (RepositoryException e) {
-                    log.warn("Unable to convert a default value", e);
-                }
-            }
-            return values.toArray(new Value[values.size()]);
-        } else {
-            return null;
-        }
-    }
-
     @Nonnull
     private String getOakName(String jcrName) {
         String oakName = (jcrName == null) ? null : mapper.getOakNameOrNull(jcrName);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/ImmutableRootTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/ImmutableRootTest.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/ImmutableRootTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/ImmutableRootTest.java
Tue Feb 18 14:16:37 2014
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.oak.core;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.fail;
-
 import java.io.ByteArrayInputStream;
 
 import org.apache.jackrabbit.oak.NodeStoreFixture;
@@ -30,6 +27,9 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
+
 public class ImmutableRootTest extends OakBaseTest {
 
     private ImmutableRoot root;
@@ -98,12 +98,5 @@ public class ImmutableRootTest extends O
         } catch (UnsupportedOperationException e) {
             // success
         }
-
-        try {
-            root.copy("/x", "/b");
-            fail();
-        } catch (UnsupportedOperationException e) {
-            // success
-        }
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/user/LoginModuleImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/user/LoginModuleImplTest.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/user/LoginModuleImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/user/LoginModuleImplTest.java
Tue Feb 18 14:16:37 2014
@@ -54,12 +54,6 @@ public class LoginModuleImplTest extends
     private User user;
 
     @Override
-    public void before() throws Exception {
-        // TODO
-        super.before();
-    }
-
-    @Override
     public void after() throws Exception {
         if (user != null) {
             user.remove();

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/AuthorizableDelegator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/AuthorizableDelegator.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/AuthorizableDelegator.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/AuthorizableDelegator.java
Tue Feb 18 14:16:37 2014
@@ -24,7 +24,6 @@ import java.util.Iterator;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
 
 import com.google.common.base.Function;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/TargetImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/TargetImportHandler.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/TargetImportHandler.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/TargetImportHandler.java
Tue Feb 18 14:16:37 2014
@@ -182,18 +182,6 @@ public abstract class TargetImportHandle
             return docPrefix;
         }
 
-        String getRepoPrefix() {
-            return repoPrefix;
-        }
-
-        String getDocQualifiedName() {
-            if (docPrefix == null || docPrefix.isEmpty()) {
-                return localName;
-            } else {
-                return docPrefix + ':' + localName;
-            }
-        }
-
         String getRepoQualifiedName() {
             if (repoPrefix == null || repoPrefix.isEmpty()) {
                 return localName;
@@ -201,9 +189,5 @@ public abstract class TargetImportHandle
                 return repoPrefix + ':' + localName;
             }
         }
-
-        String getExpandedName() {
-            return '{' + namespaceUri + '}' + localName;
-        }
     }
 }

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlImporterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlImporterTest.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlImporterTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlImporterTest.java
Tue Feb 18 14:16:37 2014
@@ -112,36 +112,6 @@ public class AccessControlImporterTest e
             "</sv:node>" +
             "</sv:node>";
 
-    public static final String XML_POLICY_TREE_4 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+
-            "<sv:node sv:name=\"rep:policy\" " +
-            "xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"
xmlns:fn_old=\"http://www.w3.org/2004/10/xpath-functions\" xmlns:fn=\"http://www.w3.org/2005/xpath-functions\"
xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\" xmlns:rep=\"internal\"
xmlns:jcr=\"http://www.jcp.org/jcr/1.0\">" +
-            "<sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\">" +
-            "<sv:value>rep:ACL</sv:value>" +
-            "</sv:property>" +
-            "<sv:node sv:name=\"allow\">" +
-            "<sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\">" +
-            "<sv:value>rep:GrantACE</sv:value>" +
-            "</sv:property>" +
-            "<sv:property sv:name=\"rep:principalName\" sv:type=\"String\">" +
-            "<sv:value>unknownprincipal</sv:value>" +
-            "</sv:property>" +
-            "<sv:property sv:name=\"rep:privileges\" sv:type=\"Name\">" +
-            "<sv:value>jcr:write</sv:value>" +
-            "</sv:property>" +
-            "</sv:node>" +
-            "<sv:node sv:name=\"allow0\">" +
-            "<sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\">" +
-            "<sv:value>rep:GrantACE</sv:value>" +
-            "</sv:property>" +
-            "<sv:property sv:name=\"rep:principalName\" sv:type=\"String\">" +
-            "<sv:value>admin</sv:value>" +
-            "</sv:property>" +
-            "<sv:property sv:name=\"rep:privileges\" sv:type=\"Name\">" +
-            "<sv:value>jcr:write</sv:value>" +
-            "</sv:property>" +
-            "</sv:node>" +
-            "</sv:node>";
-
     public static final String XML_POLICY_TREE_5 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+
             "<sv:node sv:name=\"rep:policy\" " +
             "xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"
xmlns:fn_old=\"http://www.w3.org/2004/10/xpath-functions\" xmlns:fn=\"http://www.w3.org/2005/xpath-functions\"
xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\" xmlns:rep=\"internal\"
xmlns:jcr=\"http://www.jcp.org/jcr/1.0\">" +

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableTest.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableTest.java
Tue Feb 18 14:16:37 2014
@@ -21,7 +21,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
 
 import org.apache.jackrabbit.api.security.user.Authorizable;
@@ -139,7 +138,7 @@ public class AuthorizableTest extends Ab
                 return user.removeProperty(name);
             }
 
-            public String getPath() throws UnsupportedRepositoryOperationException, RepositoryException
{
+            public String getPath() throws RepositoryException {
                 return user.getPath();
             }
         };

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportWithActionsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportWithActionsTest.java?rev=1569336&r1=1569335&r2=1569336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportWithActionsTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportWithActionsTest.java
Tue Feb 18 14:16:37 2014
@@ -227,11 +227,6 @@ public class UserImportWithActionsTest e
         superuser.importXML(parentPath, in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
     }
 
-    private void doImport(String parentPath, String xml, int importUUIDBehavior) throws IOException,
RepositoryException {
-        InputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
-        superuser.importXML(parentPath, in, importUUIDBehavior);
-    }
-
     private final class TestAction implements AuthorizableAction {
         private String id;
         private String pw;



Mime
View raw message