You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2018/11/07 13:57:58 UTC
svn commit: r1846014 [2/14] - in /jackrabbit/oak/branches/1.8: ./ oak-core/
oak-core/src/main/java/org/apache/jackrabbit/oak/
oak-core/src/main/java/org/apache/jackrabbit/oak/core/
oak-core/src/main/java/org/apache/jackrabbit/oak/management/ oak-core/s...
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeBuilder.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeBuilder.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeBuilder.java Wed Nov 7 13:57:55 2018
@@ -18,10 +18,6 @@ package org.apache.jackrabbit.oak.core;
import java.io.IOException;
import java.io.InputStream;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
import com.google.common.base.Predicate;
import org.apache.jackrabbit.oak.api.Blob;
import org.apache.jackrabbit.oak.api.PropertyState;
@@ -33,6 +29,8 @@ import org.apache.jackrabbit.oak.spi.sec
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
@@ -95,8 +93,8 @@ class SecureNodeBuilder implements NodeB
* @param permissionProvider The {@code PermissionProvider} used to evaluation read access.
*/
SecureNodeBuilder(
- @Nonnull NodeBuilder builder,
- @Nonnull LazyValue<PermissionProvider> permissionProvider) {
+ @NotNull NodeBuilder builder,
+ @NotNull LazyValue<PermissionProvider> permissionProvider) {
this.rootBuilder = this;
this.parent = null;
this.name = null;
@@ -112,12 +110,12 @@ class SecureNodeBuilder implements NodeB
this.builder = parent.builder.getChildNode(name);
}
- @Override @Nonnull
+ @Override @NotNull
public NodeState getBaseState() {
return new SecureNodeState(builder.getBaseState(), getTreePermission());
}
- @Override @Nonnull
+ @Override @NotNull
public NodeState getNodeState() {
return new SecureNodeState(builder.getNodeState(), getTreePermission());
}
@@ -169,11 +167,11 @@ class SecureNodeBuilder implements NodeB
@Override
- public boolean moveTo(@Nonnull NodeBuilder newParent, @Nonnull String newName) {
+ public boolean moveTo(@NotNull NodeBuilder newParent, @NotNull String newName) {
return exists() && builder.moveTo(newParent, newName);
}
- @CheckForNull
+ @Nullable
@Override
public PropertyState getProperty(String name) {
PropertyState property = builder.getProperty(name);
@@ -200,7 +198,7 @@ class SecureNodeBuilder implements NodeB
}
}
- @Nonnull
+ @NotNull
@Override
public Iterable<? extends PropertyState> getProperties() {
if (getTreePermission().canReadProperties() || isNew()) {
@@ -213,14 +211,14 @@ class SecureNodeBuilder implements NodeB
}
@Override
- public boolean getBoolean(@Nonnull String name) {
+ public boolean getBoolean(@NotNull String name) {
PropertyState property = getProperty(name);
return isType(property, BOOLEAN) && property.getValue(BOOLEAN);
}
- @CheckForNull
+ @Nullable
@Override
- public String getString(@Nonnull String name) {
+ public String getString(@NotNull String name) {
PropertyState property = getProperty(name);
if (isType(property, STRING)) {
return property.getValue(STRING);
@@ -229,9 +227,9 @@ class SecureNodeBuilder implements NodeB
}
}
- @CheckForNull
+ @Nullable
@Override
- public String getName(@Nonnull String name) {
+ public String getName(@NotNull String name) {
PropertyState property = getProperty(name);
if (isType(property, NAME)) {
return property.getValue(NAME);
@@ -240,9 +238,9 @@ class SecureNodeBuilder implements NodeB
}
}
- @Nonnull
+ @NotNull
@Override
- public Iterable<String> getNames(@Nonnull String name) {
+ public Iterable<String> getNames(@NotNull String name) {
PropertyState property = getProperty(name);
if (isType(property, NAMES)) {
return property.getValue(NAMES);
@@ -251,29 +249,29 @@ class SecureNodeBuilder implements NodeB
}
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder setProperty(@Nonnull PropertyState property) {
+ public NodeBuilder setProperty(@NotNull PropertyState property) {
builder.setProperty(property);
return this;
}
- @Nonnull
+ @NotNull
@Override
- public <T> NodeBuilder setProperty(String name, @Nonnull T value) {
+ public <T> NodeBuilder setProperty(String name, @NotNull T value) {
builder.setProperty(name, value);
return this;
}
- @Nonnull
+ @NotNull
@Override
public <T> NodeBuilder setProperty(
- String name, @Nonnull T value, Type<T> type) {
+ String name, @NotNull T value, Type<T> type) {
builder.setProperty(name, value, type);
return this;
}
- @Nonnull
+ @NotNull
@Override
public NodeBuilder removeProperty(String name) {
if (hasProperty(name)) { // only remove properties that we can see
@@ -282,7 +280,7 @@ class SecureNodeBuilder implements NodeB
return this;
}
- @Nonnull
+ @NotNull
@Override
public Iterable<String> getChildNodeNames() {
return filter(
@@ -291,7 +289,7 @@ class SecureNodeBuilder implements NodeB
}
@Override
- public boolean hasChildNode(@Nonnull String name) {
+ public boolean hasChildNode(@NotNull String name) {
if (builder.hasChildNode(name)) {
return getChildNode(name).exists();
} else {
@@ -299,9 +297,9 @@ class SecureNodeBuilder implements NodeB
}
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder child(@Nonnull String name) {
+ public NodeBuilder child(@NotNull String name) {
if (hasChildNode(name)) {
return getChildNode(name);
} else {
@@ -309,23 +307,23 @@ class SecureNodeBuilder implements NodeB
}
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder setChildNode(@Nonnull String name) {
+ public NodeBuilder setChildNode(@NotNull String name) {
builder.setChildNode(name);
return new SecureNodeBuilder(this, name);
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder setChildNode(@Nonnull String name, @Nonnull NodeState nodeState) {
+ public NodeBuilder setChildNode(@NotNull String name, @NotNull NodeState nodeState) {
builder.setChildNode(name, nodeState);
return new SecureNodeBuilder(this, name);
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder getChildNode(@Nonnull String name) {
+ public NodeBuilder getChildNode(@NotNull String name) {
return new SecureNodeBuilder(this, name);
}
@@ -348,7 +346,7 @@ class SecureNodeBuilder implements NodeB
*
* @return The permissions for this tree.
*/
- @Nonnull
+ @NotNull
private TreePermission getTreePermission() {
if (treePermission == null
|| rootPermission != rootBuilder.treePermission) {
@@ -365,7 +363,7 @@ class SecureNodeBuilder implements NodeB
return treePermission;
}
- private static boolean isType(@CheckForNull PropertyState property, Type<?> type) {
+ private static boolean isType(@Nullable PropertyState property, Type<?> type) {
Type<?> t = (property == null) ? null : property.getType();
return t == type;
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeState.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeState.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SecureNodeState.java Wed Nov 7 13:57:55 2018
@@ -16,10 +16,6 @@
*/
package org.apache.jackrabbit.oak.core;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import org.apache.jackrabbit.oak.api.PropertyState;
@@ -30,6 +26,8 @@ import org.apache.jackrabbit.oak.spi.sta
import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Iterables.filter;
@@ -52,7 +50,7 @@ class SecureNodeState extends AbstractNo
private long propertyCount = -1;
- SecureNodeState(@Nonnull NodeState state, @Nonnull TreePermission treePermission) {
+ SecureNodeState(@NotNull NodeState state, @NotNull TreePermission treePermission) {
this.state = checkNotNull(state);
this.treePermission = checkNotNull(treePermission);
}
@@ -62,8 +60,8 @@ class SecureNodeState extends AbstractNo
return treePermission.canRead();
}
- @Override @CheckForNull
- public PropertyState getProperty(@Nonnull String name) {
+ @Override @Nullable
+ public PropertyState getProperty(@NotNull String name) {
PropertyState property = state.getProperty(name);
if (property != null && treePermission.canRead(property)) {
return property;
@@ -86,7 +84,7 @@ class SecureNodeState extends AbstractNo
return propertyCount;
}
- @Override @Nonnull
+ @Override @NotNull
public Iterable<? extends PropertyState> getProperties() {
if (treePermission.canReadProperties()) {
return state.getProperties();
@@ -98,7 +96,7 @@ class SecureNodeState extends AbstractNo
}
@Override
- public boolean hasChildNode(@Nonnull String name) {
+ public boolean hasChildNode(@NotNull String name) {
if (!state.hasChildNode(name)) {
return false;
} else if (treePermission.canReadAll()) {
@@ -109,9 +107,9 @@ class SecureNodeState extends AbstractNo
}
}
- @Nonnull
+ @NotNull
@Override
- public NodeState getChildNode(@Nonnull String name) {
+ public NodeState getChildNode(@NotNull String name) {
NodeState child = state.getChildNode(name);
if (child.exists() && !treePermission.canReadAll()) {
ChildNodeEntry entry = new MemoryChildNodeEntry(name, child);
@@ -138,7 +136,7 @@ class SecureNodeState extends AbstractNo
return childNodeCount;
}
- @Override @Nonnull
+ @Override @NotNull
public Iterable<? extends ChildNodeEntry> getChildNodeEntries() {
if (treePermission.canReadAll()) {
// everything is readable including ac-content -> no secure wrapper needed
@@ -153,7 +151,7 @@ class SecureNodeState extends AbstractNo
}
}
- @Override @Nonnull
+ @Override @NotNull
public NodeBuilder builder() {
return new MemoryNodeBuilder(this);
}
@@ -190,9 +188,9 @@ class SecureNodeState extends AbstractNo
* we can optimize access by skipping the security wrapper entirely.
*/
private class WrapChildEntryFunction implements Function<ChildNodeEntry, ChildNodeEntry> {
- @Nonnull
+ @NotNull
@Override
- public ChildNodeEntry apply(@Nonnull ChildNodeEntry input) {
+ public ChildNodeEntry apply(@NotNull ChildNodeEntry input) {
String name = input.getName();
NodeState child = input.getNodeState();
TreePermission childContext = treePermission.getChildPermission(name, child);
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SystemRoot.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SystemRoot.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SystemRoot.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/core/SystemRoot.java Wed Nov 7 13:57:55 2018
@@ -16,8 +16,6 @@
*/
package org.apache.jackrabbit.oak.core;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import javax.security.auth.Subject;
import org.apache.jackrabbit.oak.api.Root;
@@ -28,6 +26,8 @@ import org.apache.jackrabbit.oak.spi.sec
import org.apache.jackrabbit.oak.spi.security.authentication.LoginContext;
import org.apache.jackrabbit.oak.spi.security.authentication.SystemSubject;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Internal extension of the {@link MutableRoot} to be used
@@ -48,16 +48,16 @@ public class SystemRoot extends MutableR
}
};
- public static SystemRoot create(@Nonnull NodeStore store, @Nonnull CommitHook hook,
- @Nonnull String workspaceName, @Nonnull SecurityProvider securityProvider,
- @Nonnull QueryIndexProvider indexProvider) {
+ public static SystemRoot create(@NotNull NodeStore store, @NotNull CommitHook hook,
+ @NotNull String workspaceName, @NotNull SecurityProvider securityProvider,
+ @NotNull QueryIndexProvider indexProvider) {
return create(store, hook, workspaceName, securityProvider, null, indexProvider);
}
- public static SystemRoot create(@Nonnull NodeStore store, @Nonnull CommitHook hook,
- @Nonnull String workspaceName, @Nonnull SecurityProvider securityProvider,
+ public static SystemRoot create(@NotNull NodeStore store, @NotNull CommitHook hook,
+ @NotNull String workspaceName, @NotNull SecurityProvider securityProvider,
@Nullable QueryEngineSettings queryEngineSettings,
- @Nonnull QueryIndexProvider indexProvider) {
+ @NotNull QueryIndexProvider indexProvider) {
if (queryEngineSettings == null) {
queryEngineSettings = new QueryEngineSettings();
}
@@ -65,15 +65,15 @@ public class SystemRoot extends MutableR
queryEngineSettings, indexProvider);
}
- private SystemRoot(@Nonnull final NodeStore store, @Nonnull final CommitHook hook,
- @Nonnull final String workspaceName, @Nonnull final SecurityProvider securityProvider,
- @Nonnull final QueryEngineSettings queryEngineSettings,
- @Nonnull final QueryIndexProvider indexProvider) {
+ private SystemRoot(@NotNull final NodeStore store, @NotNull final CommitHook hook,
+ @NotNull final String workspaceName, @NotNull final SecurityProvider securityProvider,
+ @NotNull final QueryEngineSettings queryEngineSettings,
+ @NotNull final QueryIndexProvider indexProvider) {
this(store, hook, workspaceName, securityProvider, queryEngineSettings, indexProvider,
new ContentSessionImpl(
LOGIN_CONTEXT, securityProvider, workspaceName,
store, hook, queryEngineSettings, indexProvider) {
- @Nonnull
+ @NotNull
@Override
public Root getLatestRoot() {
return new SystemRoot(
@@ -84,11 +84,11 @@ public class SystemRoot extends MutableR
});
}
- private SystemRoot(@Nonnull NodeStore store, @Nonnull CommitHook hook,
- @Nonnull String workspaceName, @Nonnull SecurityProvider securityProvider,
+ private SystemRoot(@NotNull NodeStore store, @NotNull CommitHook hook,
+ @NotNull String workspaceName, @NotNull SecurityProvider securityProvider,
@Nullable QueryEngineSettings queryEngineSettings,
- @Nonnull QueryIndexProvider indexProvider,
- @Nonnull ContentSessionImpl session) {
+ @NotNull QueryIndexProvider indexProvider,
+ @NotNull ContentSessionImpl session) {
super(store, hook, workspaceName, SystemSubject.INSTANCE,
securityProvider, queryEngineSettings, indexProvider, session);
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/management/RepositoryManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/management/RepositoryManager.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/management/RepositoryManager.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/management/RepositoryManager.java Wed Nov 7 13:57:55 2018
@@ -33,7 +33,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
-import javax.annotation.Nonnull;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.TabularData;
@@ -47,6 +46,7 @@ import org.apache.jackrabbit.oak.plugins
import org.apache.jackrabbit.oak.spi.state.RevisionGCMBean;
import org.apache.jackrabbit.oak.spi.whiteboard.Tracker;
import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
+import org.jetbrains.annotations.NotNull;
/**
* Default implementation of the {@link RepositoryManagementMBean} based
@@ -58,7 +58,7 @@ import org.apache.jackrabbit.oak.spi.whi
public class RepositoryManager extends AnnotatedStandardMBean implements RepositoryManagementMBean {
private final Whiteboard whiteboard;
- public RepositoryManager(@Nonnull Whiteboard whiteboard) {
+ public RepositoryManager(@NotNull Whiteboard whiteboard) {
super(RepositoryManagementMBean.class);
this.whiteboard = checkNotNull(whiteboard);
}
@@ -112,7 +112,7 @@ public class RepositoryManager extends A
@Override
public CompositeData startBackup() {
return execute(FileStoreBackupRestoreMBean.class, new Function<FileStoreBackupRestoreMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(FileStoreBackupRestoreMBean fileStoreBackupRestoreMBean) {
return fromCompositeData(fileStoreBackupRestoreMBean.startBackup());
@@ -123,7 +123,7 @@ public class RepositoryManager extends A
@Override
public CompositeData getBackupStatus() {
return execute(FileStoreBackupRestoreMBean.class, new Function<FileStoreBackupRestoreMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(FileStoreBackupRestoreMBean backupService) {
return fromCompositeData(backupService.getBackupStatus());
@@ -134,7 +134,7 @@ public class RepositoryManager extends A
@Override
public CompositeData startRestore() {
return execute(FileStoreBackupRestoreMBean.class, new Function<FileStoreBackupRestoreMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(FileStoreBackupRestoreMBean backupService) {
return fromCompositeData(backupService.startRestore());
@@ -145,7 +145,7 @@ public class RepositoryManager extends A
@Override
public CompositeData getRestoreStatus() {
return execute(FileStoreBackupRestoreMBean.class, new Function<FileStoreBackupRestoreMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(FileStoreBackupRestoreMBean backupService) {
return fromCompositeData(backupService.getRestoreStatus());
@@ -156,7 +156,7 @@ public class RepositoryManager extends A
@Override
public CompositeData startDataStoreGC(final boolean markOnly) {
return execute(BlobGCMBean.class, new Function<BlobGCMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(BlobGCMBean blobGCService) {
return fromCompositeData(blobGCService.startBlobGC(markOnly));
@@ -167,7 +167,7 @@ public class RepositoryManager extends A
@Override
public CompositeData getDataStoreGCStatus() {
return execute(BlobGCMBean.class, new Function<BlobGCMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(BlobGCMBean blobGCService) {
return fromCompositeData(blobGCService.getBlobGCStatus());
@@ -183,7 +183,7 @@ public class RepositoryManager extends A
@Override
public CompositeData startRevisionGCForRole(String role) {
return execute(RevisionGCMBean.class, new Function<RevisionGCMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(RevisionGCMBean revisionGCService) {
return fromCompositeData(revisionGCService.startRevisionGC());
@@ -191,17 +191,17 @@ public class RepositoryManager extends A
}, singletonMap("role", role)).toCompositeData();
}
- @Nonnull
+ @NotNull
@Override
public CompositeData cancelRevisionGC() {
return cancelRevisionGCForRole(null);
}
- @Nonnull
+ @NotNull
@Override
public CompositeData cancelRevisionGCForRole(String role) {
return execute(RevisionGCMBean.class, new Function<RevisionGCMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(RevisionGCMBean revisionGCService) {
return fromCompositeData(revisionGCService.cancelRevisionGC());
@@ -214,11 +214,11 @@ public class RepositoryManager extends A
return getRevisionGCStatusForRole(null);
}
- @Nonnull
+ @NotNull
@Override
public CompositeData getRevisionGCStatusForRole(String role) {
return execute(RevisionGCMBean.class, new Function<RevisionGCMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(RevisionGCMBean revisionGCService) {
return fromCompositeData(revisionGCService.getRevisionGCStatus());
@@ -229,7 +229,7 @@ public class RepositoryManager extends A
@Override
public String checkpoint(final long lifetime) {
Status status = execute(FileStoreBackupRestoreMBean.class, new Function<FileStoreBackupRestoreMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(FileStoreBackupRestoreMBean backupService) {
String checkpoint = backupService.checkpoint(lifetime);
@@ -246,7 +246,7 @@ public class RepositoryManager extends A
public CompositeData startPropertyIndexAsyncReindex() {
return execute(PropertyIndexAsyncReindexMBean.class,
new Function<PropertyIndexAsyncReindexMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(PropertyIndexAsyncReindexMBean reindexer) {
return fromCompositeData(reindexer
@@ -259,7 +259,7 @@ public class RepositoryManager extends A
public CompositeData getPropertyIndexAsyncReindexStatus() {
return execute(PropertyIndexAsyncReindexMBean.class,
new Function<PropertyIndexAsyncReindexMBean, Status>() {
- @Nonnull
+ @NotNull
@Override
public Status apply(PropertyIndexAsyncReindexMBean reindexer) {
return fromCompositeData(reindexer
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/GlobalNameMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/GlobalNameMapper.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/GlobalNameMapper.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/GlobalNameMapper.java Wed Nov 7 13:57:55 2018
@@ -35,8 +35,6 @@ import static org.apache.jackrabbit.oak.
import java.util.Map;
import java.util.Map.Entry;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
import javax.jcr.RepositoryException;
import org.apache.jackrabbit.oak.api.Root;
@@ -44,6 +42,8 @@ import org.apache.jackrabbit.oak.api.Tre
import org.apache.jackrabbit.oak.namepath.NameMapper;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Name mapper with no local prefix remappings. URI to prefix mappings
@@ -113,8 +113,8 @@ public class GlobalNameMapper implements
this.nsdata = createReadOnlyTree(reverse.getNodeState());
}
- @Override @Nonnull
- public String getJcrName(@Nonnull String oakName) {
+ @Override @NotNull
+ public String getJcrName(@NotNull String oakName) {
// Sanity checks, can be turned to assertions if needed for performance
checkNotNull(oakName);
checkArgument(!isHiddenName(oakName), oakName);
@@ -123,8 +123,8 @@ public class GlobalNameMapper implements
return oakName;
}
- @Override @CheckForNull
- public String getOakNameOrNull(@Nonnull String jcrName) {
+ @Override @Nullable
+ public String getOakNameOrNull(@NotNull String jcrName) {
if (jcrName.startsWith("{")) {
return getOakNameFromExpanded(jcrName);
}
@@ -132,8 +132,8 @@ public class GlobalNameMapper implements
return jcrName;
}
- @Override @Nonnull
- public String getOakName(@Nonnull String jcrName) throws RepositoryException {
+ @Override @NotNull
+ public String getOakName(@NotNull String jcrName) throws RepositoryException {
String oakName = getOakNameOrNull(jcrName);
if (oakName == null) {
throw new RepositoryException("Invalid jcr name " + jcrName);
@@ -141,13 +141,13 @@ public class GlobalNameMapper implements
return oakName;
}
- @Nonnull
+ @NotNull
@Override
public Map<String, String> getSessionLocalMappings() {
return emptyMap();
}
- @CheckForNull
+ @Nullable
protected String getOakNameFromExpanded(String expandedName) {
checkArgument(expandedName.startsWith("{"));
@@ -170,7 +170,7 @@ public class GlobalNameMapper implements
return expandedName; // not an expanded name
}
- @CheckForNull
+ @Nullable
protected synchronized String getOakPrefixOrNull(String uri) {
if (uri.isEmpty()) {
return uri;
@@ -179,7 +179,7 @@ public class GlobalNameMapper implements
return getNsData(encodeUri(uri));
}
- @CheckForNull
+ @Nullable
protected synchronized String getOakURIOrNull(String prefix) {
if (prefix.isEmpty()) {
return prefix;
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java Wed Nov 7 13:57:55 2018
@@ -21,10 +21,9 @@ import static com.google.common.base.Pre
import java.util.Map;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.Root;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Name mapper with local namespace mappings.
@@ -44,13 +43,13 @@ public class LocalNameMapper extends Glo
this.local = local;
}
- @Override @Nonnull
+ @Override @NotNull
public synchronized Map<String, String> getSessionLocalMappings() {
return local;
}
- @Override @Nonnull
- public synchronized String getJcrName(@Nonnull String oakName) {
+ @Override @NotNull
+ public synchronized String getJcrName(@NotNull String oakName) {
checkNotNull(oakName);
checkArgument(!oakName.startsWith(":"), oakName); // hidden name
checkArgument(!isExpandedName(oakName), oakName); // expanded name
@@ -92,8 +91,8 @@ public class LocalNameMapper extends Glo
return oakName;
}
- @Override @CheckForNull
- public synchronized String getOakNameOrNull(@Nonnull String jcrName) {
+ @Override @Nullable
+ public synchronized String getOakNameOrNull(@NotNull String jcrName) {
checkNotNull(jcrName);
if (jcrName.startsWith("{")) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java Wed Nov 7 13:57:55 2018
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import javax.annotation.Nonnull;
import javax.jcr.RepositoryException;
import org.apache.jackrabbit.oak.commons.PathUtils;
@@ -29,6 +28,7 @@ import org.apache.jackrabbit.oak.namepat
import org.apache.jackrabbit.oak.namepath.NameMapper;
import org.apache.jackrabbit.oak.namepath.NamePathMapper;
import org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager;
+import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,23 +57,23 @@ public class NamePathMapperImpl implemen
//---------------------------------------------------------< NameMapper >---
@Override
- public String getOakNameOrNull(@Nonnull String jcrName) {
+ public String getOakNameOrNull(@NotNull String jcrName) {
return nameMapper.getOakNameOrNull(jcrName);
}
- @Nonnull
+ @NotNull
@Override
- public String getOakName(@Nonnull String jcrName) throws RepositoryException {
+ public String getOakName(@NotNull String jcrName) throws RepositoryException {
return nameMapper.getOakName(jcrName);
}
- @Nonnull
+ @NotNull
@Override
- public String getJcrName(@Nonnull String oakName) {
+ public String getJcrName(@NotNull String oakName) {
return nameMapper.getJcrName(oakName);
}
- @Override @Nonnull
+ @Override @NotNull
public Map<String, String> getSessionLocalMappings() {
return nameMapper.getSessionLocalMappings();
}
@@ -158,7 +158,7 @@ public class NamePathMapperImpl implemen
}
@Override
- @Nonnull
+ @NotNull
public String getJcrPath(final String oakPath) {
if ("/".equals(oakPath)) {
// avoid the need to special case the root path later on
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java Wed Nov 7 13:57:55 2018
@@ -28,9 +28,6 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterators;
@@ -52,6 +49,8 @@ import org.apache.jackrabbit.oak.spi.sta
import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
import org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -190,7 +189,7 @@ public class AtomicCounterEditor extends
* @param store the current Oak node store. If null the editor will be synchronous.
* @param board the current Oak {@link Whiteboard}.
*/
- public AtomicCounterEditor(@Nonnull final NodeBuilder builder,
+ public AtomicCounterEditor(@NotNull final NodeBuilder builder,
@Nullable String instanceId,
@Nullable ScheduledExecutorService executor,
@Nullable NodeStore store,
@@ -251,7 +250,7 @@ public class AtomicCounterEditor extends
*
* @param builder the builder to work on. Cannot be null.
*/
- public static void consolidateCount(@Nonnull final NodeBuilder builder) {
+ public static void consolidateCount(@NotNull final NodeBuilder builder) {
long count = 0;
for (PropertyState p : builder.getProperties()) {
if (p.getName().startsWith(PREFIX_PROP_COUNTER)) {
@@ -357,12 +356,12 @@ public class AtomicCounterEditor extends
private final long start;
private final CommitHook hook;
- public ConsolidatorTask(@Nonnull String path,
+ public ConsolidatorTask(@NotNull String path,
@Nullable PropertyState revision,
- @Nonnull NodeStore store,
- @Nonnull ScheduledExecutorService exec,
+ @NotNull NodeStore store,
+ @NotNull ScheduledExecutorService exec,
long delay,
- @Nonnull CommitHook hook) {
+ @NotNull CommitHook hook) {
this.start = System.currentTimeMillis();
p = checkNotNull(path);
rev = revision;
@@ -373,7 +372,7 @@ public class AtomicCounterEditor extends
this.name = UUID.randomUUID().toString();
}
- private ConsolidatorTask(@Nonnull ConsolidatorTask task, long delay) {
+ private ConsolidatorTask(@NotNull ConsolidatorTask task, long delay) {
checkNotNull(task);
this.p = task.p;
this.rev = task.rev;
@@ -430,7 +429,7 @@ public class AtomicCounterEditor extends
return null;
}
- private void dumpNode(@Nonnull NodeBuilder b, String path) {
+ private void dumpNode(@NotNull NodeBuilder b, String path) {
if (LOG.isTraceEnabled()) {
checkNotNull(b);
StringBuilder s = new StringBuilder();
@@ -485,7 +484,7 @@ public class AtomicCounterEditor extends
* @param revision
* @return
*/
- static boolean checkRevision(@Nonnull NodeBuilder builder, @Nullable PropertyState revision) {
+ static boolean checkRevision(@NotNull NodeBuilder builder, @Nullable PropertyState revision) {
if (revision == null) {
return true;
}
@@ -504,7 +503,7 @@ public class AtomicCounterEditor extends
return false;
}
- private static NodeBuilder builderFromPath(@Nonnull NodeBuilder ancestor, @Nonnull String path) {
+ private static NodeBuilder builderFromPath(@NotNull NodeBuilder ancestor, @NotNull String path) {
NodeBuilder b = checkNotNull(ancestor);
for (String name : PathUtils.elements(checkNotNull(path))) {
b = b.getChildNode(name);
@@ -520,7 +519,7 @@ public class AtomicCounterEditor extends
* @param b the builde to check. Canno be null.
* @return true if the sum of the hidden counters does not match the exposed one.
*/
- static boolean isConsolidate(@Nonnull NodeBuilder b) {
+ static boolean isConsolidate(@NotNull NodeBuilder b) {
checkNotNull(b);
PropertyState counter = b.getProperty(PROP_COUNTER);
if (counter == null) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditorProvider.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditorProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditorProvider.java Wed Nov 7 13:57:55 2018
@@ -21,8 +21,6 @@ import java.util.concurrent.ScheduledExe
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicReference;
-import javax.annotation.Nullable;
-
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser;
import org.apache.jackrabbit.oak.osgi.OsgiWhiteboard;
@@ -35,6 +33,7 @@ import org.apache.jackrabbit.oak.spi.sta
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
+import org.jetbrains.annotations.Nullable;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/ConflictHook.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/ConflictHook.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/ConflictHook.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/ConflictHook.java Wed Nov 7 13:57:55 2018
@@ -16,8 +16,6 @@
*/
package org.apache.jackrabbit.oak.plugins.commit;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.spi.commit.CommitHook;
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
@@ -25,6 +23,7 @@ import org.apache.jackrabbit.oak.spi.com
import org.apache.jackrabbit.oak.spi.commit.ConflictHandlers;
import org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
/**
* This commit hook implementation is responsible for resolving
@@ -59,7 +58,7 @@ public class ConflictHook implements Com
this.conflictHandler = conflictHandler;
}
- @Nonnull
+ @NotNull
@Override
public NodeState processCommit(
NodeState before, NodeState after, CommitInfo info)
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/DefaultThreeWayConflictHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/DefaultThreeWayConflictHandler.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/DefaultThreeWayConflictHandler.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/DefaultThreeWayConflictHandler.java Wed Nov 7 13:57:55 2018
@@ -19,8 +19,7 @@
package org.apache.jackrabbit.oak.plugins.commit;
import org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler;
-
-import javax.annotation.Nonnull;
+import org.jetbrains.annotations.NotNull;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
@@ -59,56 +58,56 @@ public class DefaultThreeWayConflictHand
this.resolution = resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs,
PropertyState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution addExistingNode(NodeBuilder parent, String name, NodeState ours, NodeState theirs) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution changeDeletedNode(NodeBuilder parent, String name, NodeState ours, NodeState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution deleteChangedNode(NodeBuilder parent, String name, NodeState theirs, NodeState base) {
return resolution;
}
- @Nonnull
+ @NotNull
@Override
public Resolution deleteDeletedNode(NodeBuilder parent, String name, NodeState base) {
return resolution;
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/JcrLastModifiedConflictHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/JcrLastModifiedConflictHandler.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/JcrLastModifiedConflictHandler.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/JcrLastModifiedConflictHandler.java Wed Nov 7 13:57:55 2018
@@ -25,11 +25,10 @@ import static org.apache.jackrabbit.util
import java.util.Calendar;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Type;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.jetbrains.annotations.NotNull;
/**
* Conflict Handler that merges concurrent updates to
@@ -44,7 +43,7 @@ public class JcrLastModifiedConflictHand
super(Resolution.IGNORED);
}
- @Nonnull
+ @NotNull
@Override
public Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs) {
if (isModifiedOrCreated(ours.getName())) {
@@ -54,7 +53,7 @@ public class JcrLastModifiedConflictHand
return Resolution.IGNORED;
}
- @Nonnull
+ @NotNull
@Override
public Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs,
PropertyState base) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/BranchNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/BranchNodeStore.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/BranchNodeStore.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/BranchNodeStore.java Wed Nov 7 13:57:55 2018
@@ -26,8 +26,8 @@ import org.apache.jackrabbit.oak.spi.com
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.jetbrains.annotations.NotNull;
-import javax.annotation.Nonnull;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
@@ -39,7 +39,6 @@ import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
-
import static com.google.common.collect.Iterables.addAll;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Lists.newCopyOnWriteArrayList;
@@ -79,57 +78,57 @@ public class BranchNodeStore implements
}
}
- @Nonnull
+ @NotNull
@Override
public NodeState getRoot() {
return memoryNodeStore.getRoot();
}
- @Nonnull
+ @NotNull
@Override
- public synchronized NodeState merge(@Nonnull NodeBuilder builder, @Nonnull CommitHook commitHook, @Nonnull CommitInfo info) throws CommitFailedException {
+ public synchronized NodeState merge(@NotNull NodeBuilder builder, @NotNull CommitHook commitHook, @NotNull CommitInfo info) throws CommitFailedException {
return memoryNodeStore.merge(builder, commitHook, info);
}
- @Nonnull
+ @NotNull
@Override
- public NodeState rebase(@Nonnull NodeBuilder builder) {
+ public NodeState rebase(@NotNull NodeBuilder builder) {
return memoryNodeStore.rebase(builder);
}
@Override
- public NodeState reset(@Nonnull NodeBuilder builder) {
+ public NodeState reset(@NotNull NodeBuilder builder) {
return memoryNodeStore.reset(builder);
}
- @Nonnull
+ @NotNull
@Override
public Blob createBlob(InputStream inputStream) throws IOException {
return memoryNodeStore.createBlob(inputStream);
}
@Override
- public Blob getBlob(@Nonnull String reference) {
+ public Blob getBlob(@NotNull String reference) {
return memoryNodeStore.getBlob(reference);
}
- @Nonnull
+ @NotNull
@Override
- public String checkpoint(long lifetime, @Nonnull Map<String, String> properties) {
+ public String checkpoint(long lifetime, @NotNull Map<String, String> properties) {
String checkpoint = memoryNodeStore.checkpoint(lifetime, properties);
String uuid = UUID.randomUUID().toString();
checkpointMapping.put(uuid, checkpoint);
return uuid;
}
- @Nonnull
+ @NotNull
@Override
public String checkpoint(long lifetime) {
return checkpoint(lifetime, emptyMap());
}
- @Nonnull
+ @NotNull
@Override
public Iterable<String> checkpoints() {
List<String> result = newArrayList(inheritedCheckpoints);
@@ -143,9 +142,9 @@ public class BranchNodeStore implements
return result;
}
- @Nonnull
+ @NotNull
@Override
- public Map<String, String> checkpointInfo(@Nonnull String checkpoint) {
+ public Map<String, String> checkpointInfo(@NotNull String checkpoint) {
if (inheritedCheckpoints.contains(checkpoint)) {
return nodeStore.checkpointInfo(checkpoint);
} else if (checkpointMapping.containsKey(checkpoint)) {
@@ -156,7 +155,7 @@ public class BranchNodeStore implements
}
@Override
- public NodeState retrieve(@Nonnull String checkpoint) {
+ public NodeState retrieve(@NotNull String checkpoint) {
if (inheritedCheckpoints.contains(checkpoint)) {
return nodeStore.retrieve(checkpoint);
} else if (checkpointMapping.containsKey(checkpoint)) {
@@ -167,7 +166,7 @@ public class BranchNodeStore implements
}
@Override
- public boolean release(@Nonnull String checkpoint) {
+ public boolean release(@NotNull String checkpoint) {
if (inheritedCheckpoints.contains(checkpoint)) {
return nodeStore.release(checkpoint);
} else if (checkpointMapping.containsKey(checkpoint)) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/COWNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/COWNodeStore.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/COWNodeStore.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/cow/COWNodeStore.java Wed Nov 7 13:57:55 2018
@@ -27,15 +27,14 @@ import org.apache.jackrabbit.oak.spi.com
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.jetbrains.annotations.NotNull;
-import javax.annotation.Nonnull;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
-
/**
* <p>The copy-on-write (COW) node store implementation allows to temporarily
* switch the repository into the "testing" mode, in which all the changes are
@@ -120,71 +119,71 @@ public class COWNodeStore implements Nod
return () -> observers.remove(observer);
}
- @Nonnull
+ @NotNull
@Override
public NodeState getRoot() {
return getNodeStore().getRoot();
}
- @Nonnull
+ @NotNull
@Override
- public NodeState merge(@Nonnull NodeBuilder builder, @Nonnull CommitHook commitHook, @Nonnull CommitInfo info) throws CommitFailedException {
+ public NodeState merge(@NotNull NodeBuilder builder, @NotNull CommitHook commitHook, @NotNull CommitInfo info) throws CommitFailedException {
return getNodeStore(builder).merge(builder, commitHook, info);
}
- @Nonnull
+ @NotNull
@Override
- public NodeState rebase(@Nonnull NodeBuilder builder) {
+ public NodeState rebase(@NotNull NodeBuilder builder) {
return getNodeStore(builder).rebase(builder);
}
@Override
- public NodeState reset(@Nonnull NodeBuilder builder) {
+ public NodeState reset(@NotNull NodeBuilder builder) {
return getNodeStore(builder).reset(builder);
}
- @Nonnull
+ @NotNull
@Override
public Blob createBlob(InputStream inputStream) throws IOException {
return getNodeStore().createBlob(inputStream);
}
@Override
- public Blob getBlob(@Nonnull String reference) {
+ public Blob getBlob(@NotNull String reference) {
return getNodeStore().getBlob(reference);
}
- @Nonnull
+ @NotNull
@Override
- public String checkpoint(long lifetime, @Nonnull Map<String, String> properties) {
+ public String checkpoint(long lifetime, @NotNull Map<String, String> properties) {
return getNodeStore().checkpoint(lifetime, properties);
}
- @Nonnull
+ @NotNull
@Override
public String checkpoint(long lifetime) {
return getNodeStore().checkpoint(lifetime);
}
- @Nonnull
+ @NotNull
@Override
- public Map<String, String> checkpointInfo(@Nonnull String checkpoint) {
+ public Map<String, String> checkpointInfo(@NotNull String checkpoint) {
return getNodeStore().checkpointInfo(checkpoint);
}
- @Nonnull
+ @NotNull
@Override
public Iterable<String> checkpoints() {
return getNodeStore().checkpoints();
}
@Override
- public NodeState retrieve(@Nonnull String checkpoint) {
+ public NodeState retrieve(@NotNull String checkpoint) {
return getNodeStore().retrieve(checkpoint);
}
@Override
- public boolean release(@Nonnull String checkpoint) {
+ public boolean release(@NotNull String checkpoint) {
return getNodeStore().release(checkpoint);
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/IdentifierManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/IdentifierManager.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/IdentifierManager.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/IdentifierManager.java Wed Nov 7 13:57:55 2018
@@ -20,9 +20,6 @@ import java.text.ParseException;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import javax.jcr.PropertyType;
import javax.jcr.query.Query;
@@ -48,6 +45,8 @@ import org.apache.jackrabbit.oak.plugins
import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
import org.apache.jackrabbit.oak.spi.nodetype.EffectiveNodeTypeProvider;
import org.apache.jackrabbit.oak.spi.version.VersionConstants;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,7 +75,7 @@ public class IdentifierManager {
/**
* @deprecated Use {@link UUIDUtils#generateUUID()}
*/
- @Nonnull
+ @NotNull
public static String generateUUID() {
return UUIDUtils.generateUUID();
}
@@ -84,7 +83,7 @@ public class IdentifierManager {
/**
* @deprecated Use {@link UUIDUtils#generateUUID(String)}
*/
- @Nonnull
+ @NotNull
public static String generateUUID(String hint) {
return UUIDUtils.generateUUID(hint);
}
@@ -102,7 +101,7 @@ public class IdentifierManager {
* @param tree a tree
* @return identifier of {@code tree}
*/
- @Nonnull
+ @NotNull
public static String getIdentifier(Tree tree) {
PropertyState property = tree.getProperty(JcrConstants.JCR_UUID);
if (property != null) {
@@ -122,7 +121,7 @@ public class IdentifierManager {
* @return The tree with the given {@code identifier} or {@code null} if no
* such tree exists.
*/
- @CheckForNull
+ @Nullable
public Tree getTree(String identifier) {
if (identifier.startsWith("/")) {
return root.getTree(identifier);
@@ -152,7 +151,7 @@ public class IdentifierManager {
* @return The path of the tree with the given {@code identifier} or {@code null} if no
* such tree exists or if the tree is not accessible.
*/
- @CheckForNull
+ @Nullable
public String getPath(String identifier) {
Tree tree = getTree(identifier);
return tree != null && tree.exists()
@@ -168,7 +167,7 @@ public class IdentifierManager {
* @return The tree with the given {@code identifier} or {@code null} if no
* such tree exists or isn't accessible to the content session.
*/
- @CheckForNull
+ @Nullable
public String getPath(PropertyState referenceValue) {
int type = referenceValue.getType().tag();
if (type == PropertyType.REFERENCE || type == PropertyType.WEAKREFERENCE) {
@@ -186,7 +185,7 @@ public class IdentifierManager {
* @return The tree with the given {@code identifier} or {@code null} if no
* such tree exists or isn't accessible to the content session.
*/
- @CheckForNull
+ @Nullable
public String getPath(PropertyValue referenceValue) {
int type = referenceValue.getType().tag();
if (type == PropertyType.REFERENCE || type == PropertyType.WEAKREFERENCE) {
@@ -208,8 +207,8 @@ public class IdentifierManager {
* @return A set of oak paths of those reference properties referring to the
* specified {@code tree} and matching the constraints.
*/
- @Nonnull
- public Iterable<String> getReferences(boolean weak, @Nonnull Tree tree, @Nullable final String propertyName) {
+ @NotNull
+ public Iterable<String> getReferences(boolean weak, @NotNull Tree tree, @Nullable final String propertyName) {
if (!effectiveNodeTypeProvider.isNodeType(tree, JcrConstants.MIX_REFERENCEABLE)) {
return Collections.emptySet(); // shortcut
}
@@ -231,8 +230,8 @@ public class IdentifierManager {
}
}
- @Nonnull
- private Iterable<String> findPaths(@Nonnull final Result result, @Nonnull final String uuid,
+ @NotNull
+ private Iterable<String> findPaths(@NotNull final Result result, @NotNull final String uuid,
@Nullable final String propertyName, final boolean weak) {
return new Iterable<String>() {
@Override
@@ -300,9 +299,9 @@ public class IdentifierManager {
* @return A set of oak paths of those reference properties referring to the
* specified {@code tree} and matching the constraints.
*/
- @Nonnull
- public Iterable<String> getReferences(@Nonnull Tree tree, @Nonnull final String propertyName,
- @Nonnull String ntName, boolean weak) {
+ @NotNull
+ public Iterable<String> getReferences(@NotNull Tree tree, @NotNull final String propertyName,
+ @NotNull String ntName, boolean weak) {
if (!effectiveNodeTypeProvider.isNodeType(tree, JcrConstants.MIX_REFERENCEABLE)) {
return Collections.emptySet(); // shortcut
}
@@ -337,7 +336,7 @@ public class IdentifierManager {
}
}
- @CheckForNull
+ @Nullable
public String resolveUUID(String uuid) {
return resolveUUID(StringPropertyState.stringProperty("", uuid));
}
@@ -372,4 +371,4 @@ public class IdentifierManager {
}
}
-}
\ No newline at end of file
+}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfo.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfo.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfo.java Wed Nov 7 13:57:55 2018
@@ -19,10 +19,8 @@
package org.apache.jackrabbit.oak.plugins.index;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
import org.apache.jackrabbit.oak.api.jmx.IndexStatsMBean;
+import org.jetbrains.annotations.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -75,7 +73,7 @@ public class AsyncIndexInfo {
* the async indexer is active. For other cluster nodes
* the values may not reflect the current state
*/
- @CheckForNull
+ @Nullable
public IndexStatsMBean getStatsMBean() {
return statsMBean;
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfoService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfoService.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfoService.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexInfoService.java Wed Nov 7 13:57:55 2018
@@ -21,9 +21,8 @@ package org.apache.jackrabbit.oak.plugin
import java.util.Map;
-import javax.annotation.CheckForNull;
-
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.Nullable;
public interface AsyncIndexInfoService {
@@ -45,14 +44,14 @@ public interface AsyncIndexInfoService {
/**
* Returns the info for async indexer with given name
*/
- @CheckForNull
+ @Nullable
AsyncIndexInfo getInfo(String name);
/**
* Returns the info for async indexer with given name
* and based on given root NodeState
*/
- @CheckForNull
+ @Nullable
AsyncIndexInfo getInfo(String name, NodeState root);
/**
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java Wed Nov 7 13:57:55 2018
@@ -39,8 +39,6 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.CompositeType;
@@ -91,6 +89,8 @@ import org.apache.jackrabbit.oak.stats.S
import org.apache.jackrabbit.oak.stats.TimerStats;
import org.apache.jackrabbit.stats.TimeSeriesStatsUtil;
import org.apache.jackrabbit.util.ISO8601;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -205,13 +205,13 @@ public class AsyncIndexUpdate implements
private final StatisticsProvider statisticsProvider;
- public AsyncIndexUpdate(@Nonnull String name, @Nonnull NodeStore store,
- @Nonnull IndexEditorProvider provider, boolean switchOnSync) {
+ public AsyncIndexUpdate(@NotNull String name, @NotNull NodeStore store,
+ @NotNull IndexEditorProvider provider, boolean switchOnSync) {
this(name, store, provider, StatisticsProvider.NOOP, switchOnSync);
}
- public AsyncIndexUpdate(@Nonnull String name, @Nonnull NodeStore store,
- @Nonnull IndexEditorProvider provider, StatisticsProvider statsProvider, boolean switchOnSync) {
+ public AsyncIndexUpdate(@NotNull String name, @NotNull NodeStore store,
+ @NotNull IndexEditorProvider provider, StatisticsProvider statsProvider, boolean switchOnSync) {
this.name = checkValidName(name);
this.lastIndexedTo = lastIndexedTo(name);
this.store = checkNotNull(store);
@@ -222,8 +222,8 @@ public class AsyncIndexUpdate implements
this.indexStats = new AsyncIndexStats(name, statsProvider);
}
- public AsyncIndexUpdate(@Nonnull String name, @Nonnull NodeStore store,
- @Nonnull IndexEditorProvider provider) {
+ public AsyncIndexUpdate(@NotNull String name, @NotNull NodeStore store,
+ @NotNull IndexEditorProvider provider) {
this(name, store, provider, false);
}
@@ -830,7 +830,7 @@ public class AsyncIndexUpdate implements
NodeBuilder builder, final String checkpoint, final Long lease,
final String name) throws CommitFailedException {
CommitHook concurrentUpdateCheck = new CommitHook() {
- @Override @Nonnull
+ @Override @NotNull
public NodeState processCommit(
NodeState before, NodeState after, CommitInfo info)
throws CommitFailedException {
@@ -1388,7 +1388,7 @@ public class AsyncIndexUpdate implements
this.newIndexTaskName = newIndexTaskName;
}
- void maybeSplit(@CheckForNull String refCheckpoint, Long lease)
+ void maybeSplit(@Nullable String refCheckpoint, Long lease)
throws CommitFailedException {
if (paths == null) {
return;
@@ -1396,7 +1396,7 @@ public class AsyncIndexUpdate implements
split(refCheckpoint, lease);
}
- private void split(@CheckForNull String refCheckpoint, Long lease) throws CommitFailedException {
+ private void split(@Nullable String refCheckpoint, Long lease) throws CommitFailedException {
NodeBuilder builder = store.getRoot().builder();
if (refCheckpoint != null) {
String tempCpName = getTempCpName(name);
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/CompositeIndexEditorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/CompositeIndexEditorProvider.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/CompositeIndexEditorProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/CompositeIndexEditorProvider.java Wed Nov 7 13:57:55 2018
@@ -20,13 +20,12 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.spi.commit.CompositeEditor;
import org.apache.jackrabbit.oak.spi.commit.Editor;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
@@ -36,14 +35,14 @@ import com.google.common.collect.Lists;
*/
public class CompositeIndexEditorProvider implements IndexEditorProvider {
- @Nonnull
+ @NotNull
public static IndexEditorProvider compose(
- @Nonnull Collection<IndexEditorProvider> providers) {
+ @NotNull Collection<IndexEditorProvider> providers) {
if (providers.isEmpty()) {
return new IndexEditorProvider() {
@Override
public Editor getIndexEditor(
- @Nonnull String type, @Nonnull NodeBuilder builder, @Nonnull NodeState root, @Nonnull IndexUpdateCallback callback) {
+ @NotNull String type, @NotNull NodeBuilder builder, @NotNull NodeState root, @NotNull IndexUpdateCallback callback) {
return null;
}
};
@@ -67,7 +66,7 @@ public class CompositeIndexEditorProvide
@Override
public Editor getIndexEditor(
- @Nonnull String type, @Nonnull NodeBuilder builder, @Nonnull NodeState root, @Nonnull IndexUpdateCallback callback)
+ @NotNull String type, @NotNull NodeBuilder builder, @NotNull NodeState root, @NotNull IndexUpdateCallback callback)
throws CommitFailedException {
List<Editor> indexes = Lists.newArrayList();
for (IndexEditorProvider provider : providers) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/Cursors.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/Cursors.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/Cursors.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/Cursors.java Wed Nov 7 13:57:55 2018
@@ -22,8 +22,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import javax.annotation.Nullable;
-
import org.apache.jackrabbit.oak.api.Result.SizePrecision;
import org.apache.jackrabbit.oak.commons.PathUtils;
import org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry;
@@ -38,6 +36,7 @@ import org.apache.jackrabbit.oak.spi.que
import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
+import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexEditorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexEditorProvider.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexEditorProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexEditorProvider.java Wed Nov 7 13:57:55 2018
@@ -16,13 +16,12 @@
*/
package org.apache.jackrabbit.oak.plugins.index;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.spi.commit.Editor;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Extension point for plugging in different kinds of IndexEditor providers.
@@ -52,9 +51,9 @@ public interface IndexEditorProvider {
* @param callback used to register for index update notifications
* @return index update editor, or {@code null} if type is unknown
*/
- @CheckForNull
+ @Nullable
Editor getIndexEditor(
- @Nonnull String type, @Nonnull NodeBuilder definition,
- @Nonnull NodeState root,
- @Nonnull IndexUpdateCallback callback) throws CommitFailedException;
+ @NotNull String type, @NotNull NodeBuilder definition,
+ @NotNull NodeState root,
+ @NotNull IndexUpdateCallback callback) throws CommitFailedException;
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfo.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfo.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfo.java Wed Nov 7 13:57:55 2018
@@ -19,8 +19,7 @@
package org.apache.jackrabbit.oak.plugins.index;
-import javax.annotation.CheckForNull;
-
+import org.jetbrains.annotations.Nullable;
import org.osgi.annotation.versioning.ProviderType;
/**
@@ -42,7 +41,7 @@ public interface IndexInfo {
* Returns name of the async index lane to which this index is bound to
* or null if its not an async index
*/
- @CheckForNull
+ @Nullable
String getAsyncLaneName();
/**
@@ -89,6 +88,6 @@ public interface IndexInfo {
* definition
* @return diff if the definition change otherwise null
*/
- @CheckForNull
+ @Nullable
String getIndexDefinitionDiff();
}
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoProvider.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoProvider.java Wed Nov 7 13:57:55 2018
@@ -21,8 +21,7 @@ package org.apache.jackrabbit.oak.plugin
import java.io.IOException;
-import javax.annotation.CheckForNull;
-
+import org.jetbrains.annotations.Nullable;
import org.osgi.annotation.versioning.ConsumerType;
/**
@@ -38,7 +37,7 @@ public interface IndexInfoProvider {
*/
String getType();
- @CheckForNull
+ @Nullable
IndexInfo getInfo(String indexPath) throws IOException;
/**
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoService.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoService.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoService.java Wed Nov 7 13:57:55 2018
@@ -21,8 +21,7 @@ package org.apache.jackrabbit.oak.plugin
import java.io.IOException;
-import javax.annotation.CheckForNull;
-
+import org.jetbrains.annotations.Nullable;
import org.osgi.annotation.versioning.ProviderType;
@ProviderType
@@ -42,7 +41,7 @@ public interface IndexInfoService {
* @return indexInfo for the index or null if there is no index node
* found at given path
*/
- @CheckForNull
+ @Nullable
IndexInfo getInfo(String indexPath) throws IOException;
/**
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java Wed Nov 7 13:57:55 2018
@@ -44,9 +44,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import com.google.common.collect.Iterables;
import org.apache.jackrabbit.oak.api.CommitFailedException;
@@ -65,6 +62,8 @@ import org.apache.jackrabbit.oak.spi.sta
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
import org.apache.jackrabbit.util.ISO8601;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -424,7 +423,7 @@ public class IndexUpdate implements Edit
}
}
- @Override @Nonnull
+ @Override @NotNull
public Editor childNodeAdded(String name, NodeState after)
throws CommitFailedException {
List<Editor> children = newArrayListWithCapacity(1 + editors.size());
@@ -438,7 +437,7 @@ public class IndexUpdate implements Edit
return compose(children);
}
- @Override @Nonnull
+ @Override @NotNull
public Editor childNodeChanged(
String name, NodeState before, NodeState after)
throws CommitFailedException {
@@ -453,7 +452,7 @@ public class IndexUpdate implements Edit
return compose(children);
}
- @Override @CheckForNull
+ @Override @Nullable
public Editor childNodeDeleted(String name, NodeState before)
throws CommitFailedException {
List<Editor> children = newArrayListWithCapacity(editors.size());
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateProvider.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateProvider.java Wed Nov 7 13:57:55 2018
@@ -16,9 +16,6 @@
*/
package org.apache.jackrabbit.oak.plugins.index;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.plugins.index.IndexUpdate.MissingIndexProviderStrategy;
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
import org.apache.jackrabbit.oak.spi.commit.Editor;
@@ -26,6 +23,8 @@ import org.apache.jackrabbit.oak.spi.com
import org.apache.jackrabbit.oak.spi.commit.VisibleEditor;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
public class IndexUpdateProvider implements EditorProvider {
@@ -56,14 +55,14 @@ public class IndexUpdateProvider impleme
}
public IndexUpdateProvider(
- @Nonnull IndexEditorProvider provider, @CheckForNull String async, boolean failOnMissingIndexProvider) {
+ @NotNull IndexEditorProvider provider, @Nullable String async, boolean failOnMissingIndexProvider) {
this.provider = provider;
this.async = async;
this.missingStrategy = new MissingIndexProviderStrategy();
this.missingStrategy.setFailOnMissingIndexProvider(failOnMissingIndexProvider);
}
- @Override @CheckForNull
+ @Override @Nullable
public Editor getRootEditor(
NodeState before, NodeState after,
NodeBuilder builder, CommitInfo info) {
Modified: jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java?rev=1846014&r1=1846013&r2=1846014&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java (original)
+++ jackrabbit/oak/branches/1.8/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUtils.java Wed Nov 7 13:57:55 2018
@@ -34,9 +34,6 @@ import java.util.Collection;
import java.util.Map;
import java.util.Set;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import javax.jcr.RepositoryException;
import com.google.common.collect.ImmutableList;
@@ -51,6 +48,8 @@ import org.apache.jackrabbit.oak.plugins
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.plugins.tree.TreeUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* TODO document
@@ -84,11 +83,11 @@ public class IndexUtils {
* @param declaringNodeTypeNames The declaring node type names or {@code null}.
* @return the NodeBuilder of the new index definition.
*/
- public static NodeBuilder createIndexDefinition(@Nonnull NodeBuilder index,
- @Nonnull String indexDefName,
+ public static NodeBuilder createIndexDefinition(@NotNull NodeBuilder index,
+ @NotNull String indexDefName,
boolean reindex,
boolean unique,
- @Nonnull Collection<String> propertyNames,
+ @NotNull Collection<String> propertyNames,
@Nullable Collection<String> declaringNodeTypeNames) {
NodeBuilder entry = index.child(indexDefName)
.setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE, NAME)
@@ -113,11 +112,11 @@ public class IndexUtils {
* @param propertyNames
* @param declaringNodeTypeNames
*/
- public static Tree createIndexDefinition(@Nonnull Tree indexNode,
- @Nonnull String indexDefName,
+ public static Tree createIndexDefinition(@NotNull Tree indexNode,
+ @NotNull String indexDefName,
boolean unique,
- @Nonnull String[] propertyNames,
- @Nonnull String... declaringNodeTypeNames) throws RepositoryException {
+ @NotNull String[] propertyNames,
+ @NotNull String... declaringNodeTypeNames) throws RepositoryException {
return createIndexDefinition(indexNode, indexDefName, unique, ImmutableList.copyOf(propertyNames), ImmutableList.copyOf(declaringNodeTypeNames), PropertyIndexEditorProvider.TYPE, null);
}
@@ -135,13 +134,13 @@ public class IndexUtils {
* @param properties any additional property to be added to the index definition.
* @throws RepositoryException
*/
- public static Tree createIndexDefinition(@Nonnull Tree indexNode,
- @Nonnull String indexDefName,
+ public static Tree createIndexDefinition(@NotNull Tree indexNode,
+ @NotNull String indexDefName,
boolean unique,
- @Nonnull Collection<String> propertyNames,
- @CheckForNull Collection<String> declaringNodeTypeNames,
- @Nonnull String propertyIndexType,
- @CheckForNull Map<String, String> properties) throws RepositoryException {
+ @NotNull Collection<String> propertyNames,
+ @Nullable Collection<String> declaringNodeTypeNames,
+ @NotNull String propertyIndexType,
+ @Nullable Map<String, String> properties) throws RepositoryException {
Tree entry = TreeUtil.getOrAddChild(indexNode, indexDefName, INDEX_DEFINITIONS_NODE_TYPE);
entry.setProperty(TYPE_PROPERTY_NAME, propertyIndexType);
entry.setProperty(REINDEX_PROPERTY_NAME, true);
@@ -161,7 +160,7 @@ public class IndexUtils {
return entry;
}
- public static void createReferenceIndex(@Nonnull NodeBuilder index) {
+ public static void createReferenceIndex(@NotNull NodeBuilder index) {
index.child(NodeReferenceConstants.NAME)
.setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE, NAME)
.setProperty(TYPE_PROPERTY_NAME, NodeReferenceConstants.TYPE)
@@ -196,12 +195,12 @@ public class IndexUtils {
* @param properties any additional property to be added to the index definition.
* @throws RepositoryException
*/
- public static NodeBuilder createIndexDefinition(@Nonnull NodeBuilder indexNode,
- @Nonnull String indexDefName,
+ public static NodeBuilder createIndexDefinition(@NotNull NodeBuilder indexNode,
+ @NotNull String indexDefName,
boolean unique,
- @Nonnull Iterable<String> propertyNames,
+ @NotNull Iterable<String> propertyNames,
@Nullable String[] declaringNodeTypeNames,
- @Nonnull String propertyIndexType,
+ @NotNull String propertyIndexType,
Map<String, String> properties) throws RepositoryException {
NodeBuilder entry = indexNode.child(indexDefName)
@@ -225,12 +224,12 @@ public class IndexUtils {
return entry;
}
- @CheckForNull
+ @Nullable
public static String getAsyncLaneName(NodeState idxState, String indexPath) {
return getAsyncLaneName(idxState, indexPath, idxState.getProperty(IndexConstants.ASYNC_PROPERTY_NAME));
}
- @CheckForNull
+ @Nullable
public static String getAsyncLaneName(NodeState idxState, String indexPath, PropertyState async) {
if (async != null) {
Set<String> asyncNames = Sets.newHashSet(async.getValue(Type.STRINGS));