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/07/18 15:10:02 UTC
svn commit: r1836195 [3/3] - in /jackrabbit/oak/trunk/oak-store-spi: ./
src/main/java/org/apache/jackrabbit/oak/plugins/memory/
src/main/java/org/apache/jackrabbit/oak/plugins/value/
src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/ src/main/j...
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeState.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeState.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeState.java Wed Jul 18 15:10:00 2018
@@ -16,11 +16,9 @@
*/
package org.apache.jackrabbit.oak.spi.state;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
import org.apache.jackrabbit.oak.api.PropertyState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import com.google.common.base.Predicate;
@@ -144,7 +142,7 @@ public interface NodeState {
* @return {@code true} if the named property exists,
* {@code false} otherwise
*/
- boolean hasProperty(@Nonnull String name);
+ boolean hasProperty(@NotNull String name);
/**
* Returns the named property, or {@code null} if no such property exists.
@@ -152,8 +150,8 @@ public interface NodeState {
* @param name name of the property to return
* @return named property, or {@code null} if not found
*/
- @CheckForNull
- PropertyState getProperty(@Nonnull String name);
+ @Nullable
+ PropertyState getProperty(@NotNull String name);
/**
* Returns the boolean value of the named property. The implementation
@@ -170,7 +168,7 @@ public interface NodeState {
* @param name property name
* @return boolean value of the named property, or {@code false}
*/
- boolean getBoolean(@Nonnull String name);
+ boolean getBoolean(@NotNull String name);
/**
* Returns the long value of the named property. The implementation
@@ -209,7 +207,7 @@ public interface NodeState {
* @param name property name
* @return string value of the named property, or {@code null}
*/
- @CheckForNull
+ @Nullable
String getString(String name);
/**
@@ -229,8 +227,8 @@ public interface NodeState {
* @param name property name
* @return string values of the named property, or an empty collection
*/
- @Nonnull
- Iterable<String> getStrings(@Nonnull String name);
+ @NotNull
+ Iterable<String> getStrings(@NotNull String name);
/**
* Returns the name value of the named property. The implementation
@@ -249,8 +247,8 @@ public interface NodeState {
* @param name property name
* @return name value of the named property, or {@code null}
*/
- @CheckForNull
- String getName(@Nonnull String name);
+ @Nullable
+ String getName(@NotNull String name);
/**
* Returns the name values of the named property. The implementation
@@ -269,8 +267,8 @@ public interface NodeState {
* @param name property name
* @return name values of the named property, or an empty collection
*/
- @Nonnull
- Iterable<String> getNames(@Nonnull String name);
+ @NotNull
+ Iterable<String> getNames(@NotNull String name);
/**
* Returns the number of properties of this node.
@@ -287,7 +285,7 @@ public interface NodeState {
*
* @return properties in some stable order
*/
- @Nonnull
+ @NotNull
Iterable<? extends PropertyState> getProperties();
/**
@@ -300,7 +298,7 @@ public interface NodeState {
* @return {@code true} if the named child node exists,
* {@code false} otherwise
*/
- boolean hasChildNode(@Nonnull String name);
+ boolean hasChildNode(@NotNull String name);
/**
* Returns the named, possibly non-existent, child node. Use the
@@ -312,8 +310,8 @@ public interface NodeState {
* @throws IllegalArgumentException if the given name string is is empty
* or contains a forward slash character
*/
- @Nonnull
- NodeState getChildNode(@Nonnull String name) throws IllegalArgumentException;
+ @NotNull
+ NodeState getChildNode(@NotNull String name) throws IllegalArgumentException;
/**
* Returns the number of <em>iterable</em> child nodes of this node.
@@ -351,7 +349,7 @@ public interface NodeState {
*
* @return child node entries in some stable order
*/
- @Nonnull
+ @NotNull
Iterable<? extends ChildNodeEntry> getChildNodeEntries();
/**
@@ -362,7 +360,7 @@ public interface NodeState {
* @since Oak 0.6
* @return node builder based on this state
*/
- @Nonnull
+ @NotNull
NodeBuilder builder();
/**
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateUtils.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateUtils.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateUtils.java Wed Jul 18 15:10:00 2018
@@ -19,14 +19,13 @@ package org.apache.jackrabbit.oak.spi.st
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Strings.repeat;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.commons.io.IOUtils;
import org.apache.jackrabbit.JcrConstants;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Type;
import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Utility method for code that deals with node states.
@@ -43,7 +42,7 @@ public final class NodeStateUtils {
* @param name the node or property name
* @return true if the item is hidden
*/
- public static boolean isHidden(@Nonnull String name) {
+ public static boolean isHidden(@NotNull String name) {
return !name.isEmpty() && name.charAt(0) == ':';
}
@@ -53,7 +52,7 @@ public final class NodeStateUtils {
* @param path the path
* @return true if one of the nodes is hidden
*/
- public static boolean isHiddenPath(@Nonnull String path) {
+ public static boolean isHiddenPath(@NotNull String path) {
for (String n : PathUtils.elements(path)) {
if (isHidden(n)) {
return true;
@@ -62,7 +61,7 @@ public final class NodeStateUtils {
return false;
}
- @CheckForNull
+ @Nullable
public static String getPrimaryTypeName(NodeState nodeState) {
PropertyState ps = nodeState.getProperty(JcrConstants.JCR_PRIMARYTYPE);
return (ps == null) ? null : ps.getValue(Type.NAME);
@@ -74,8 +73,8 @@ public final class NodeStateUtils {
* @param path path of the child node
* @return child node of {@code node} at {@code path}.
*/
- @Nonnull
- public static NodeState getNode(@Nonnull NodeState node, @Nonnull String path) {
+ @NotNull
+ public static NodeState getNode(@NotNull NodeState node, @NotNull String path) {
for (String name : PathUtils.elements(checkNotNull(path))) {
node = node.getChildNode(checkNotNull(name));
}
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java Wed Jul 18 15:10:00 2018
@@ -20,13 +20,12 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.Blob;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.spi.commit.CommitHook;
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Storage abstraction for trees. At any given point in time the stored
@@ -43,7 +42,7 @@ public interface NodeStore {
*
* @return root node state
*/
- @Nonnull
+ @NotNull
NodeState getRoot();
/**
@@ -60,10 +59,10 @@ public interface NodeStore {
* @throws IllegalArgumentException if the builder is not acquired
* from a root state of this store
*/
- @Nonnull
+ @NotNull
NodeState merge(
- @Nonnull NodeBuilder builder, @Nonnull CommitHook commitHook,
- @Nonnull CommitInfo info) throws CommitFailedException;
+ @NotNull NodeBuilder builder, @NotNull CommitHook commitHook,
+ @NotNull CommitInfo info) throws CommitFailedException;
/**
* Rebases the changes between the
@@ -79,8 +78,8 @@ public interface NodeStore {
* @throws IllegalArgumentException if the builder is not acquired
* from a root state of this store
*/
- @Nonnull
- NodeState rebase(@Nonnull NodeBuilder builder);
+ @NotNull
+ NodeState rebase(@NotNull NodeBuilder builder);
/**
* Reset the passed {@code builder} by throwing away all its changes and
@@ -91,7 +90,7 @@ public interface NodeStore {
* @throws IllegalArgumentException if the builder is not acquired
* from a root state of this store
*/
- NodeState reset(@Nonnull NodeBuilder builder);
+ NodeState reset(@NotNull NodeBuilder builder);
/**
* Create a {@link Blob} from the given input stream. The input stream
@@ -100,7 +99,7 @@ public interface NodeStore {
* @return The {@code Blob} representing {@code inputStream}
* @throws IOException If an error occurs while reading from the stream
*/
- @Nonnull
+ @NotNull
Blob createBlob(InputStream inputStream) throws IOException;
/**
@@ -109,8 +108,8 @@ public interface NodeStore {
* @return blob or {@code null} if the reference does not resolve to a blob.
* @see Blob#getReference()
*/
- @CheckForNull
- Blob getBlob(@Nonnull String reference);
+ @Nullable
+ Blob getBlob(@NotNull String reference);
/**
* Creates a new checkpoint of the latest root of the tree. The checkpoint
@@ -127,8 +126,8 @@ public interface NodeStore {
* @param properties properties to associate with the checkpoint
* @return string reference of this checkpoint
*/
- @Nonnull
- String checkpoint(long lifetime, @Nonnull Map<String, String> properties);
+ @NotNull
+ String checkpoint(long lifetime, @NotNull Map<String, String> properties);
/**
* Creates a new checkpoint of the latest root of the tree. The checkpoint
@@ -143,7 +142,7 @@ public interface NodeStore {
* should remain available
* @return string reference of this checkpoint
*/
- @Nonnull
+ @NotNull
String checkpoint(long lifetime);
/**
@@ -154,8 +153,8 @@ public interface NodeStore {
* {@code checkpoint} or an empty map when there is no such
* checkpoint.
*/
- @Nonnull
- Map<String, String> checkpointInfo(@Nonnull String checkpoint);
+ @NotNull
+ Map<String, String> checkpointInfo(@NotNull String checkpoint);
/**
* Returns all valid checkpoints. The returned {@code Iterable} provides a
@@ -168,7 +167,7 @@ public interface NodeStore {
*
* @return valid checkpoints.
*/
- @Nonnull
+ @NotNull
Iterable<String> checkpoints();
/**
@@ -178,8 +177,8 @@ public interface NodeStore {
* @return the root node of the checkpoint,
* or {@code null} if the checkpoint is no longer available
*/
- @CheckForNull
- NodeState retrieve(@Nonnull String checkpoint);
+ @Nullable
+ NodeState retrieve(@NotNull String checkpoint);
/**
* Releases the provided checkpoint. If the provided checkpoint doesn't exist this method should return {@code true}.
@@ -187,6 +186,6 @@ public interface NodeStore {
* @param checkpoint string reference of a checkpoint
* @return {@code true} if the checkpoint was successfully removed, or if it doesn't exist
*/
- boolean release(@Nonnull String checkpoint);
+ boolean release(@NotNull String checkpoint);
}
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java Wed Jul 18 15:10:00 2018
@@ -16,11 +16,10 @@
*/
package org.apache.jackrabbit.oak.spi.state;
-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;
+import org.jetbrains.annotations.NotNull;
/**
* An instance of this class represents a private branch of the tree in a
@@ -36,7 +35,7 @@ public interface NodeStoreBranch {
*
* @return root node state
*/
- @Nonnull
+ @NotNull
NodeState getBase();
/**
@@ -48,7 +47,7 @@ public interface NodeStoreBranch {
* @return root node state
* @throws IllegalStateException if the branch is already merged
*/
- @Nonnull
+ @NotNull
NodeState getHead();
/**
@@ -70,8 +69,8 @@ public interface NodeStoreBranch {
* @throws CommitFailedException if the merge failed
* @throws IllegalStateException if the branch is already merged
*/
- @Nonnull
- NodeState merge(@Nonnull CommitHook hook, @Nonnull CommitInfo info)
+ @NotNull
+ NodeState merge(@NotNull CommitHook hook, @NotNull CommitInfo info)
throws CommitFailedException;
/**
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ProxyNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ProxyNodeStore.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ProxyNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ProxyNodeStore.java Wed Jul 18 15:10:00 2018
@@ -20,12 +20,11 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.Blob;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.spi.commit.CommitHook;
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.jetbrains.annotations.NotNull;
public abstract class ProxyNodeStore implements NodeStore {
@@ -59,13 +58,13 @@ public abstract class ProxyNodeStore imp
}
@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);
}
@@ -74,13 +73,13 @@ public abstract class ProxyNodeStore imp
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();
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ReadOnlyBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ReadOnlyBuilder.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ReadOnlyBuilder.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/ReadOnlyBuilder.java Wed Jul 18 15:10:00 2018
@@ -21,12 +21,11 @@ import static com.google.common.base.Pre
import java.io.IOException;
import java.io.InputStream;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.Blob;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Type;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* A node builder that throws an {@link UnsupportedOperationException} on
@@ -34,10 +33,10 @@ import org.apache.jackrabbit.oak.api.Typ
*/
public class ReadOnlyBuilder implements NodeBuilder {
- @Nonnull
+ @NotNull
private final NodeState state;
- public ReadOnlyBuilder(@Nonnull NodeState state) {
+ public ReadOnlyBuilder(@NotNull NodeState state) {
this.state = checkNotNull(state);
}
@@ -75,12 +74,12 @@ public class ReadOnlyBuilder implements
return false;
}
- @Override @Nonnull
+ @Override @NotNull
public NodeState getNodeState() {
return state;
}
- @Override @Nonnull
+ @Override @NotNull
public NodeState getBaseState() {
return state;
}
@@ -91,18 +90,18 @@ public class ReadOnlyBuilder implements
}
@Override
- public boolean hasChildNode(@Nonnull String name) {
+ public boolean hasChildNode(@NotNull String name) {
return state.hasChildNode(name);
}
- @Nonnull
+ @NotNull
@Override
public Iterable<String> getChildNodeNames() {
return state.getChildNodeNames();
}
- @Override @Nonnull
- public NodeBuilder setChildNode(@Nonnull String name, @Nonnull NodeState nodeState) {
+ @Override @NotNull
+ public NodeBuilder setChildNode(@NotNull String name, @NotNull NodeState nodeState) {
throw unsupported();
}
@@ -112,7 +111,7 @@ public class ReadOnlyBuilder implements
}
@Override
- public boolean moveTo(@Nonnull NodeBuilder newParent, @Nonnull String newName) {
+ public boolean moveTo(@NotNull NodeBuilder newParent, @NotNull String newName) {
throw unsupported();
}
@@ -121,7 +120,7 @@ public class ReadOnlyBuilder implements
return state.getPropertyCount();
}
- @Nonnull
+ @NotNull
@Override
public Iterable<? extends PropertyState> getProperties() {
return state.getProperties();
@@ -138,51 +137,51 @@ public class ReadOnlyBuilder implements
}
@Override
- public boolean getBoolean(@Nonnull String name) {
+ public boolean getBoolean(@NotNull String name) {
return state.getBoolean(name);
}
- @Override @CheckForNull
- public String getString(@Nonnull String name) {
+ @Override @Nullable
+ public String getString(@NotNull String name) {
return state.getString(name);
}
- @Override @CheckForNull
- public String getName(@Nonnull String name) {
+ @Override @Nullable
+ public String getName(@NotNull String name) {
return state.getName(name);
}
- @Override @Nonnull
- public Iterable<String> getNames(@Nonnull String name) {
+ @Override @NotNull
+ public Iterable<String> getNames(@NotNull String name) {
return state.getNames(name);
}
- @Override @Nonnull
+ @Override @NotNull
public NodeBuilder removeProperty(String name) {
throw unsupported();
}
- @Nonnull
+ @NotNull
@Override
- public NodeBuilder setProperty(@Nonnull PropertyState property) {
+ public NodeBuilder setProperty(@NotNull PropertyState property) {
throw unsupported();
}
- @Nonnull
+ @NotNull
@Override
- public <T> NodeBuilder setProperty(String name, @Nonnull T value) {
+ public <T> NodeBuilder setProperty(String name, @NotNull T value) {
throw unsupported();
}
- @Nonnull
+ @NotNull
@Override
- public <T> NodeBuilder setProperty(String name, @Nonnull T value, Type<T> type) {
+ public <T> NodeBuilder setProperty(String name, @NotNull T value, Type<T> type) {
throw unsupported();
}
- @Nonnull
+ @NotNull
@Override
- public ReadOnlyBuilder child(@Nonnull String name) {
+ public ReadOnlyBuilder child(@NotNull String name) {
NodeState child = state.getChildNode(name);
if (child.exists()) {
return new ReadOnlyBuilder(child);
@@ -191,13 +190,13 @@ public class ReadOnlyBuilder implements
}
}
- @Override @Nonnull
- public NodeBuilder getChildNode(@Nonnull String name) {
+ @Override @NotNull
+ public NodeBuilder getChildNode(@NotNull String name) {
return new ReadOnlyBuilder(state.getChildNode(name));
}
- @Override @Nonnull
- public NodeBuilder setChildNode(@Nonnull String name) {
+ @Override @NotNull
+ public NodeBuilder setChildNode(@NotNull String name) {
throw unsupported();
}
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGC.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGC.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGC.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGC.java Wed Jul 18 15:10:00 2018
@@ -28,12 +28,12 @@ import static org.apache.jackrabbit.oak.
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
-import javax.annotation.Nonnull;
import javax.management.openmbean.CompositeData;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import org.apache.jackrabbit.oak.commons.jmx.ManagementOperation;
+import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -45,19 +45,19 @@ public class RevisionGC implements Revis
public static final String OP_NAME = "Revision garbage collection";
- @Nonnull
+ @NotNull
private ManagementOperation<Void> gcOp = done(OP_NAME, null);
- @Nonnull
+ @NotNull
private final Runnable runGC;
- @Nonnull
+ @NotNull
private final Runnable cancelGC;
- @Nonnull
+ @NotNull
private final Supplier<String> statusMessage;
- @Nonnull
+ @NotNull
private final Executor executor;
/**
@@ -68,10 +68,10 @@ public class RevisionGC implements Revis
* @param executor Executor for initiating the garbage collection task
*/
public RevisionGC(
- @Nonnull Runnable runGC,
- @Nonnull Runnable cancelGC,
- @Nonnull Supplier<String> statusMessage,
- @Nonnull Executor executor) {
+ @NotNull Runnable runGC,
+ @NotNull Runnable cancelGC,
+ @NotNull Supplier<String> statusMessage,
+ @NotNull Executor executor) {
this.runGC = checkNotNull(runGC);
this.cancelGC = checkNotNull(cancelGC);
this.statusMessage = checkNotNull(statusMessage);
@@ -84,13 +84,13 @@ public class RevisionGC implements Revis
* @param executor Executor for initiating the garbage collection task
*/
public RevisionGC(
- @Nonnull Runnable runGC,
- @Nonnull Runnable cancelGC,
- @Nonnull Executor executor) {
+ @NotNull Runnable runGC,
+ @NotNull Runnable cancelGC,
+ @NotNull Executor executor) {
this(runGC, cancelGC, Suppliers.ofInstance(""), executor);
}
- @Nonnull
+ @NotNull
@Override
public CompositeData startRevisionGC() {
if (gcOp.isDone()) {
@@ -108,7 +108,7 @@ public class RevisionGC implements Revis
}
}
- @Nonnull
+ @NotNull
@Override
public CompositeData cancelRevisionGC() {
if (!gcOp.isDone()) {
@@ -126,7 +126,7 @@ public class RevisionGC implements Revis
}
}
- @Nonnull
+ @NotNull
@Override
public CompositeData getRevisionGCStatus() {
return gcOp.getStatus().toCompositeData();
Modified: jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java Wed Jul 18 15:10:00 2018
@@ -19,9 +19,10 @@
package org.apache.jackrabbit.oak.spi.state;
-import javax.annotation.Nonnull;
import javax.management.openmbean.CompositeData;
+import org.jetbrains.annotations.NotNull;
+
/**
* MBean for starting and monitoring the progress of
* revision garbage collection.
@@ -36,7 +37,7 @@ public interface RevisionGCMBean {
*
* @return the status of the operation right after it was initiated
*/
- @Nonnull
+ @NotNull
CompositeData startRevisionGC();
/**
@@ -45,7 +46,7 @@ public interface RevisionGCMBean {
*
* @return the status of the operation right after it was initiated
*/
- @Nonnull
+ @NotNull
CompositeData cancelRevisionGC();
/**
@@ -54,6 +55,6 @@ public interface RevisionGCMBean {
* @return the status of the ongoing operation or if none the terminal
* status of the last operation or <em>Status not available</em> if none.
*/
- @Nonnull
+ @NotNull
CompositeData getRevisionGCStatus();
}
Modified: jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlobTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlobTest.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlobTest.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlobTest.java Wed Jul 18 15:10:00 2018
@@ -22,9 +22,8 @@ package org.apache.jackrabbit.oak.plugin
import java.io.InputStream;
import java.util.Random;
-import javax.annotation.Nonnull;
-
import org.apache.jackrabbit.oak.api.Blob;
+import org.jetbrains.annotations.NotNull;
import org.junit.Test;
import static com.google.common.base.Preconditions.checkState;
@@ -74,7 +73,7 @@ public class AbstractBlobTest {
return id;
}
- @Nonnull
+ @NotNull
@Override
public InputStream getNewStream() {
checkState(allowAccessToContent, "Cannot access the stream");
Modified: jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java Wed Jul 18 15:10:00 2018
@@ -25,8 +25,6 @@ import static org.apache.jackrabbit.oak.
import java.util.Collection;
-import javax.annotation.Nonnull;
-
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.apache.jackrabbit.oak.api.PropertyState;
@@ -34,6 +32,7 @@ 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.junit.Assume;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -565,20 +564,20 @@ public class MemoryNodeBuilderTest {
return exists;
}
- @Nonnull
+ @NotNull
@Override
public Iterable<? extends PropertyState> getProperties() {
return ImmutableSet.of();
}
@Override
- public boolean hasChildNode(@Nonnull String name) {
+ public boolean hasChildNode(@NotNull String name) {
return "c".equals(name);
}
- @Nonnull
+ @NotNull
@Override
- public NodeState getChildNode(@Nonnull String name) {
+ public NodeState getChildNode(@NotNull String name) {
if ("c".equals(name)) {
return C;
} else {
@@ -587,7 +586,7 @@ public class MemoryNodeBuilderTest {
}
}
- @Nonnull
+ @NotNull
@Override
public Iterable<? extends ChildNodeEntry> getChildNodeEntries() {
if (exists) {
@@ -597,7 +596,7 @@ public class MemoryNodeBuilderTest {
}
}
- @Nonnull
+ @NotNull
@Override
public NodeBuilder builder() {
return new MemoryNodeBuilder(this);
Modified: jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValueTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValueTest.java?rev=1836195&r1=1836194&r2=1836195&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValueTest.java (original)
+++ jackrabbit/oak/trunk/oak-store-spi/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStateValueTest.java Wed Jul 18 15:10:00 2018
@@ -25,9 +25,8 @@ import static org.junit.Assert.assertTru
import java.util.Calendar;
import java.util.TimeZone;
-import javax.annotation.Nullable;
-
import org.apache.jackrabbit.oak.api.PropertyValue;
+import org.jetbrains.annotations.Nullable;
import org.junit.Test;
public class PropertyStateValueTest {