Index: oak-core/src/main/java/org/apache/jackrabbit/oak/OakInitializer.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/OakInitializer.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/OakInitializer.java (working copy) @@ -24,8 +24,6 @@ import com.google.common.collect.ImmutableMap; import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.core.ResetCommitAttributeHook; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider; import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider; import org.apache.jackrabbit.oak.spi.commit.CommitContext; @@ -33,6 +31,8 @@ import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.CompositeHook; import org.apache.jackrabbit.oak.spi.commit.EditorHook; +import org.apache.jackrabbit.oak.spi.commit.ResetCommitAttributeHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer; import org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableRoot.java (working copy) @@ -54,6 +54,8 @@ import org.apache.jackrabbit.oak.spi.commit.EmptyHook; import org.apache.jackrabbit.oak.spi.commit.MoveTracker; import org.apache.jackrabbit.oak.spi.commit.PostValidationHook; +import org.apache.jackrabbit.oak.spi.commit.ResetCommitAttributeHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider; import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider; import org.apache.jackrabbit.oak.spi.security.SecurityConfiguration; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ResetCommitAttributeHook.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/core/ResetCommitAttributeHook.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/core/ResetCommitAttributeHook.java (nonexistent) @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.jackrabbit.oak.core; - -import javax.annotation.Nonnull; - -import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.spi.commit.CommitContext; -import org.apache.jackrabbit.oak.spi.commit.CommitHook; -import org.apache.jackrabbit.oak.spi.commit.CommitInfo; -import org.apache.jackrabbit.oak.spi.state.NodeState; - -import static com.google.common.base.Preconditions.checkNotNull; - -public enum ResetCommitAttributeHook implements CommitHook { - INSTANCE; - - @Nonnull - @Override - public NodeState processCommit(NodeState before, NodeState after, CommitInfo info) - throws CommitFailedException { - //Reset the attributes upon each commit attempt - resetAttributes(info); - return after; - } - - private static void resetAttributes(CommitInfo info) { - SimpleCommitContext attrs = (SimpleCommitContext) info.getInfo().get(CommitContext.NAME); - //As per implementation this should not be null - checkNotNull(attrs, "No commit attribute instance found in info map").clear(); - } -} Property changes on: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ResetCommitAttributeHook.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/main/java/org/apache/jackrabbit/oak/core/SimpleCommitContext.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/core/SimpleCommitContext.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/core/SimpleCommitContext.java (nonexistent) @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.jackrabbit.oak.core; - -import java.util.Map; - -import com.google.common.collect.Maps; -import org.apache.jackrabbit.oak.spi.commit.CommitContext; - -import static com.google.common.base.Preconditions.checkNotNull; - -public class SimpleCommitContext implements CommitContext { - private final Map attrs = Maps.newHashMap(); - - @Override - public String toString() { - return "CommitContext[attrs="+attrs+"]"; - } - - @Override - public void set(String name, Object value) { - attrs.put(checkNotNull(name), value); - } - - @Override - public Object get(String name) { - return attrs.get(checkNotNull(name)); - } - - @Override - public void remove(String name) { - attrs.remove(checkNotNull(name)); - } - - void clear(){ - attrs.clear(); - } -} Property changes on: oak-core/src/main/java/org/apache/jackrabbit/oak/core/SimpleCommitContext.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java (working copy) @@ -38,7 +38,6 @@ import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.commons.PathUtils; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.memory.LongPropertyState; import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants; import org.apache.jackrabbit.oak.spi.commit.CommitContext; @@ -47,6 +46,7 @@ import org.apache.jackrabbit.oak.spi.commit.DefaultEditor; import org.apache.jackrabbit.oak.spi.commit.Editor; import org.apache.jackrabbit.oak.spi.commit.EmptyHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.spi.state.NodeStore; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (working copy) @@ -84,7 +84,6 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import org.apache.jackrabbit.oak.api.PropertyState; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.blob.BlobStoreBlob; import org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector; import org.apache.jackrabbit.oak.plugins.blob.ReferencedBlob; @@ -112,10 +111,11 @@ import org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore; import org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher; import org.apache.jackrabbit.oak.spi.commit.CommitContext; -import org.apache.jackrabbit.oak.spi.commit.Observable; import org.apache.jackrabbit.oak.spi.commit.CommitHook; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; +import org.apache.jackrabbit.oak.spi.commit.Observable; import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.AbstractNodeState; import org.apache.jackrabbit.oak.spi.state.Clusterable; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (working copy) @@ -58,8 +58,6 @@ import org.apache.jackrabbit.oak.api.jmx.IndexStatsMBean; import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean; -import org.apache.jackrabbit.oak.core.ResetCommitAttributeHook; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler; import org.apache.jackrabbit.oak.plugins.commit.ConflictHook; import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider; @@ -77,6 +75,8 @@ import org.apache.jackrabbit.oak.spi.commit.EditorDiff; import org.apache.jackrabbit.oak.spi.commit.EditorHook; import org.apache.jackrabbit.oak.spi.commit.EditorProvider; +import org.apache.jackrabbit.oak.spi.commit.ResetCommitAttributeHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider; import org.apache.jackrabbit.oak.spi.commit.VisibleEditor; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/importer/NodeStoreUtils.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/importer/NodeStoreUtils.java (revision 1808672) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/importer/NodeStoreUtils.java (working copy) @@ -25,8 +25,6 @@ import com.google.common.collect.ImmutableMap; import org.apache.jackrabbit.oak.api.CommitFailedException; import org.apache.jackrabbit.oak.commons.PathUtils; -import org.apache.jackrabbit.oak.core.ResetCommitAttributeHook; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler; import org.apache.jackrabbit.oak.plugins.commit.ConflictHook; import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider; @@ -37,6 +35,8 @@ import org.apache.jackrabbit.oak.spi.commit.CompositeEditorProvider; import org.apache.jackrabbit.oak.spi.commit.CompositeHook; import org.apache.jackrabbit.oak.spi.commit.EditorHook; +import org.apache.jackrabbit.oak.spi.commit.ResetCommitAttributeHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeStore; Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java (revision 1808672) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java (working copy) @@ -32,7 +32,6 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore; import org.apache.jackrabbit.oak.plugins.document.spi.JournalProperty; import org.apache.jackrabbit.oak.plugins.document.spi.JournalPropertyBuilder; @@ -45,6 +44,7 @@ import org.apache.jackrabbit.oak.spi.commit.EditorHook; import org.apache.jackrabbit.oak.spi.commit.EmptyHook; import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard; Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java (revision 1808672) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java (working copy) @@ -47,12 +47,12 @@ 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.core.SimpleCommitContext; import org.apache.jackrabbit.oak.InitialContent; import org.apache.jackrabbit.oak.security.SecurityProviderImpl; import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters; import org.apache.jackrabbit.oak.spi.security.SecurityProvider; import org.apache.jackrabbit.oak.spi.security.authentication.SystemSubject; Index: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorProviderTest.java =================================================================== --- oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorProviderTest.java (revision 1808672) +++ oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorProviderTest.java (working copy) @@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableSet; import org.apache.commons.lang3.reflect.FieldUtils; import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.ContextAwareCallback; import org.apache.jackrabbit.oak.plugins.index.IndexCommitCallback; import org.apache.jackrabbit.oak.plugins.index.IndexUpdateCallback; @@ -33,6 +32,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.Editor; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.mount.Mounts; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; Index: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueueTest.java =================================================================== --- oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueueTest.java (revision 1808672) +++ oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueueTest.java (working copy) @@ -32,7 +32,6 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider; import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier; @@ -45,6 +44,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.EditorHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.stats.Clock; Index: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java =================================================================== --- oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java (revision 1808672) +++ oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java (working copy) @@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Multimap; import com.google.common.util.concurrent.MoreExecutors; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; import org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder; @@ -30,6 +29,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.junit.Before; import org.junit.Rule; Index: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserverTest.java =================================================================== --- oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserverTest.java (revision 1808672) +++ oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserverTest.java (working copy) @@ -22,10 +22,10 @@ import java.util.concurrent.Executor; import com.google.common.collect.ImmutableMap; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.stats.StatisticsProvider; import org.junit.Before; import org.junit.Test; Index: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexWriterFactoryTest.java =================================================================== --- oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexWriterFactoryTest.java (revision 1808672) +++ oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexWriterFactoryTest.java (working copy) @@ -25,7 +25,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.core.SimpleCommitContext; import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.IndexingMode; @@ -35,6 +34,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.EditorHook; +import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; import org.apache.jackrabbit.oak.spi.mount.Mounts; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; Index: oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/ResetCommitAttributeHook.java =================================================================== --- oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/ResetCommitAttributeHook.java (revision 1808672) +++ oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/ResetCommitAttributeHook.java (working copy) @@ -17,14 +17,11 @@ * under the License. */ -package org.apache.jackrabbit.oak.core; +package org.apache.jackrabbit.oak.spi.commit; import javax.annotation.Nonnull; import org.apache.jackrabbit.oak.api.CommitFailedException; -import org.apache.jackrabbit.oak.spi.commit.CommitContext; -import org.apache.jackrabbit.oak.spi.commit.CommitHook; -import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.state.NodeState; import static com.google.common.base.Preconditions.checkNotNull; Index: oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/SimpleCommitContext.java =================================================================== --- oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/SimpleCommitContext.java (revision 1808672) +++ oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/SimpleCommitContext.java (working copy) @@ -17,12 +17,11 @@ * under the License. */ -package org.apache.jackrabbit.oak.core; +package org.apache.jackrabbit.oak.spi.commit; import java.util.Map; import com.google.common.collect.Maps; -import org.apache.jackrabbit.oak.spi.commit.CommitContext; import static com.google.common.base.Preconditions.checkNotNull;