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 14:45:46 UTC

svn commit: r1836182 [2/3] - in /jackrabbit/oak/trunk/oak-jcr: ./ src/main/java/org/apache/jackrabbit/oak/jcr/ src/main/java/org/apache/jackrabbit/oak/jcr/delegate/ src/main/java/org/apache/jackrabbit/oak/jcr/lock/ src/main/java/org/apache/jackrabbit/o...

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/VersionManagerDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/VersionManagerDelegate.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/VersionManagerDelegate.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/VersionManagerDelegate.java Wed Jul 18 14:45:45 2018
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.jcr.delegate;
 
-import javax.annotation.Nonnull;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
@@ -30,6 +29,7 @@ import org.apache.jackrabbit.oak.api.Typ
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.jcr.version.ReadWriteVersionManager;
 import org.apache.jackrabbit.oak.jcr.version.VersionStorage;
+import org.jetbrains.annotations.NotNull;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.apache.jackrabbit.JcrConstants.JCR_BASEVERSION;
@@ -60,14 +60,14 @@ public final class VersionManagerDelegat
         this.versionManager = new ReadWriteVersionManager(sessionDelegate);
     }
 
-    @Nonnull
-    public VersionDelegate checkin(@Nonnull NodeDelegate nodeDelegate)
+    @NotNull
+    public VersionDelegate checkin(@NotNull NodeDelegate nodeDelegate)
             throws RepositoryException {
         return VersionDelegate.create(sessionDelegate,
                 versionManager.checkin(getTree(nodeDelegate)));
     }
 
-    public void checkout(@Nonnull NodeDelegate nodeDelegate)
+    public void checkout(@NotNull NodeDelegate nodeDelegate)
             throws RepositoryException {
         // perform the operation on a fresh root because
         // it must not save pending changes in the workspace
@@ -75,25 +75,25 @@ public final class VersionManagerDelegat
         versionManager.checkout(fresh, nodeDelegate.getPath());
     }
 
-    public boolean isCheckedOut(@Nonnull NodeDelegate nodeDelegate)
+    public boolean isCheckedOut(@NotNull NodeDelegate nodeDelegate)
             throws RepositoryException {
         return versionManager.isCheckedOut(getTree(nodeDelegate));
     }
 
-    @Nonnull
-    public VersionHistoryDelegate createVersionHistory(@Nonnull NodeDelegate versionHistory)
+    @NotNull
+    public VersionHistoryDelegate createVersionHistory(@NotNull NodeDelegate versionHistory)
             throws RepositoryException {
         return new VersionHistoryDelegate(sessionDelegate, getTree(versionHistory));
     }
 
-    @Nonnull
-    public VersionDelegate createVersion(@Nonnull NodeDelegate version)
+    @NotNull
+    public VersionDelegate createVersion(@NotNull NodeDelegate version)
             throws RepositoryException {
         return VersionDelegate.create(sessionDelegate, getTree(version));
     }
 
-    @Nonnull
-    public VersionHistoryDelegate getVersionHistory(@Nonnull NodeDelegate versionable)
+    @NotNull
+    public VersionHistoryDelegate getVersionHistory(@NotNull NodeDelegate versionable)
             throws RepositoryException {
         Tree vh = versionManager.getVersionHistory(getTree(versionable));
         if (vh == null) {
@@ -103,8 +103,8 @@ public final class VersionManagerDelegat
         return new VersionHistoryDelegate(sessionDelegate, vh);
     }
 
-    @Nonnull
-    public VersionDelegate getBaseVersion(@Nonnull NodeDelegate versionable)
+    @NotNull
+    public VersionDelegate getBaseVersion(@NotNull NodeDelegate versionable)
             throws RepositoryException {
         Tree v = versionManager.getBaseVersion(getTree(versionable));
         if (v == null) {
@@ -114,8 +114,8 @@ public final class VersionManagerDelegat
         return VersionDelegate.create(sessionDelegate, v);
     }
 
-    @Nonnull
-    public VersionDelegate getVersionByIdentifier(@Nonnull String identifier)
+    @NotNull
+    public VersionDelegate getVersionByIdentifier(@NotNull String identifier)
             throws RepositoryException {
         Tree t = sessionDelegate.getIdManager().getTree(identifier);
         if (t == null || !t.exists()) {
@@ -125,9 +125,9 @@ public final class VersionManagerDelegat
         return VersionDelegate.create(sessionDelegate, t);
     }
 
-    public void restore(@Nonnull NodeDelegate parent,
-                        @Nonnull String oakName,
-                        @Nonnull VersionDelegate vd)
+    public void restore(@NotNull NodeDelegate parent,
+                        @NotNull String oakName,
+                        @NotNull VersionDelegate vd)
             throws RepositoryException {
         NodeDelegate frozen = vd.getFrozenNode();
         PropertyState primaryType = frozen.getProperty(
@@ -168,9 +168,9 @@ public final class VersionManagerDelegat
      * version history or if the specified version is the root version (jcr:rootVersion).
      * @throws RepositoryException if another error occurs.
      */
-    public void addVersionLabel(@Nonnull VersionHistoryDelegate versionHistory,
-                                @Nonnull VersionDelegate version,
-                                @Nonnull String oakVersionLabel,
+    public void addVersionLabel(@NotNull VersionHistoryDelegate versionHistory,
+                                @NotNull VersionDelegate version,
+                                @NotNull String oakVersionLabel,
                                 boolean moveLabel)
             throws InvalidItemStateException, LabelExistsVersionException,
             VersionException, RepositoryException {
@@ -195,8 +195,8 @@ public final class VersionManagerDelegat
      * @throws VersionException if the name label does not exist in this version history.
      * @throws RepositoryException if another error occurs.
      */
-    public void removeVersionLabel(@Nonnull VersionHistoryDelegate versionHistory,
-                                   @Nonnull String oakVersionLabel)
+    public void removeVersionLabel(@NotNull VersionHistoryDelegate versionHistory,
+                                   @NotNull String oakVersionLabel)
             throws InvalidItemStateException, VersionException, RepositoryException {
         // perform operation on fresh storage to not interfere
         // with pending changes in the workspace.
@@ -215,8 +215,8 @@ public final class VersionManagerDelegat
      * @param oakVersionName the version name
      * @throws RepositoryException if an error occurs.
      */
-    public void removeVersion(@Nonnull VersionHistoryDelegate versionHistory,
-                              @Nonnull String oakVersionName) throws RepositoryException {
+    public void removeVersion(@NotNull VersionHistoryDelegate versionHistory,
+                              @NotNull String oakVersionName) throws RepositoryException {
         // perform operation on fresh storage to not interfere
         // with pending changes in the workspace.
         Root fresh = sessionDelegate.getContentSession().getLatestRoot();
@@ -235,8 +235,8 @@ public final class VersionManagerDelegat
      * @return the underlying tree.
      * @throws InvalidItemStateException if the location points to a stale item.
      */
-    @Nonnull
-    private static Tree getTree(@Nonnull NodeDelegate nodeDelegate)
+    @NotNull
+    private static Tree getTree(@NotNull NodeDelegate nodeDelegate)
             throws InvalidItemStateException {
         return checkNotNull(nodeDelegate).getTree();
     }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/WorkspaceDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/WorkspaceDelegate.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/WorkspaceDelegate.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/WorkspaceDelegate.java Wed Jul 18 14:45:45 2018
@@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.annotation.Nonnull;
 import javax.jcr.ItemExistsException;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
@@ -43,6 +42,7 @@ import org.apache.jackrabbit.oak.spi.loc
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.Permissions;
 import org.apache.jackrabbit.oak.spi.version.VersionConstants;
 import org.apache.jackrabbit.util.Text;
+import org.jetbrains.annotations.NotNull;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
@@ -108,13 +108,13 @@ public class WorkspaceDelegate {
         private final Tree destParent;
         private final String destName;
 
-        public WorkspaceCopy(@Nonnull Tree source, @Nonnull Tree destParent, @Nonnull String destName) {
+        public WorkspaceCopy(@NotNull Tree source, @NotNull Tree destParent, @NotNull String destName) {
             this.source = source;
             this.destParent = destParent;
             this.destName = destName;
         }
 
-        public void perform(@Nonnull Root root, @Nonnull String userId) throws RepositoryException {
+        public void perform(@NotNull Root root, @NotNull String userId) throws RepositoryException {
             try {
                 Tree typeRoot = root.getTree(NODE_TYPES_PATH);
                 copy(source, destParent, destName, typeRoot, userId);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockImpl.java Wed Jul 18 14:45:45 2018
@@ -18,8 +18,6 @@ package org.apache.jackrabbit.oak.jcr.lo
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.lock.Lock;
@@ -31,6 +29,8 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate;
 import org.apache.jackrabbit.oak.jcr.session.operation.NodeOperation;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 public final class LockImpl implements Lock {
 
@@ -38,7 +38,7 @@ public final class LockImpl implements L
 
     private final NodeDelegate delegate;
 
-    public LockImpl(@Nonnull SessionContext context, @Nonnull NodeDelegate delegate) {
+    public LockImpl(@NotNull SessionContext context, @NotNull NodeDelegate delegate) {
         this.context = checkNotNull(context);
         this.delegate = checkNotNull(delegate);
     }
@@ -65,7 +65,7 @@ public final class LockImpl implements L
     @Override
     public boolean isDeep() {
         return getSessionDelegate().safePerform(new NodeOperation<Boolean>(delegate, "isDeep") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return node.holdsLock(true);
@@ -77,7 +77,7 @@ public final class LockImpl implements L
     public boolean isLive() {
         return context.getSession().isLive() && getSessionDelegate().safePerform(
                 new NodeOperation<Boolean>(delegate, "isLive") {
-                    @Nonnull
+                    @NotNull
                     @Override
                     public Boolean perform() {
                         return node.holdsLock(false);
@@ -126,7 +126,7 @@ public final class LockImpl implements L
     @Override
     public boolean isSessionScoped() {
         return getSessionDelegate().safePerform(new NodeOperation<Boolean>(delegate, "isSessionScoped") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 String path = node.getPath();
@@ -138,7 +138,7 @@ public final class LockImpl implements L
     @Override
     public boolean isLockOwningSession() {
         return getSessionDelegate().safePerform(new NodeOperation<Boolean>(delegate, "isLockOwningSessions") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 String path = node.getPath();
@@ -162,7 +162,7 @@ public final class LockImpl implements L
     }
 
     @Nullable
-    private <U> U savePerformNullable(@Nonnull SessionOperation<U> op) {
+    private <U> U savePerformNullable(@NotNull SessionOperation<U> op) {
         try {
             return context.getSessionDelegate().performNullable(op);
         } catch (RepositoryException e) {

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockManagerImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockManagerImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockManagerImpl.java Wed Jul 18 14:45:45 2018
@@ -21,7 +21,6 @@ import static org.apache.jackrabbit.oak.
 
 import java.util.Set;
 
-import javax.annotation.Nonnull;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
@@ -37,6 +36,7 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate;
 import org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Simple lock manager implementation that just keeps track of a set of lock
@@ -54,11 +54,11 @@ public class LockManagerImpl implements
         this.delegate = sessionContext.getSessionDelegate();
     }
 
-    @Nonnull
+    @NotNull
     @Override
     public String[] getLockTokens() throws RepositoryException {
         return delegate.perform(new SessionOperation<String[]>("getLockTokens") {
-            @Nonnull
+            @NotNull
             @Override
             public String[] perform() {
                 Set<String> tokens = sessionContext.getOpenScopedLocks();
@@ -74,7 +74,7 @@ public class LockManagerImpl implements
         try {
             delegate.performVoid(new LockOperation<Void>(sessionContext, lockToken, "addLockToken") {
                 @Override
-                protected void performVoid(@Nonnull NodeDelegate node) throws LockException {
+                protected void performVoid(@NotNull NodeDelegate node) throws LockException {
                     if (node.holdsLock(false)) { // TODO: check ownership?
                         String token = node.getPath();
                         sessionContext.getOpenScopedLocks().add(token);
@@ -92,7 +92,7 @@ public class LockManagerImpl implements
     public void removeLockToken(final String lockToken) throws RepositoryException {
         LockDeprecation.handleCall("removeLockToken");
         if (!delegate.perform(new SessionOperation<Boolean>("removeLockToken") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 // TODO: name mapping?
@@ -106,9 +106,9 @@ public class LockManagerImpl implements
     @Override
     public boolean isLocked(String absPath) throws RepositoryException {
         return delegate.perform(new LockOperation<Boolean>(sessionContext, absPath, "isLocked") {
-            @Nonnull
+            @NotNull
             @Override
-            protected Boolean perform(@Nonnull NodeDelegate node) {
+            protected Boolean perform(@NotNull NodeDelegate node) {
                 return node.isLocked();
             }
         });
@@ -117,21 +117,21 @@ public class LockManagerImpl implements
     @Override
     public boolean holdsLock(String absPath) throws RepositoryException {
         return delegate.perform(new LockOperation<Boolean>(sessionContext, absPath, "holdsLock") {
-            @Nonnull
+            @NotNull
             @Override
-            protected Boolean perform(@Nonnull NodeDelegate node) {
+            protected Boolean perform(@NotNull NodeDelegate node) {
                 return node.holdsLock(false);
             }
         });
     }
 
-    @Nonnull
+    @NotNull
     @Override
     public Lock getLock(final String absPath) throws RepositoryException {
         NodeDelegate lock = delegate.perform(new LockOperation<NodeDelegate>(sessionContext, absPath, "getLock") {
-            @Nonnull
+            @NotNull
             @Override
-            protected NodeDelegate perform(@Nonnull NodeDelegate node) throws LockException {
+            protected NodeDelegate perform(@NotNull NodeDelegate node) throws LockException {
                 NodeDelegate lock = node.getLock();
                 if (lock == null) {
                     throw new LockException("Node " + absPath + " is not locked");
@@ -144,15 +144,15 @@ public class LockManagerImpl implements
         return new LockImpl(sessionContext, lock);
     }
 
-    @Nonnull
+    @NotNull
     @Override
     public Lock lock(String absPath, final boolean isDeep, final boolean isSessionScoped,
                      long timeoutHint, String ownerInfo) throws RepositoryException {
         LockDeprecation.handleCall("lock");
         return new LockImpl(sessionContext, delegate.perform(new LockOperation<NodeDelegate>(sessionContext, absPath, "lock") {
-            @Nonnull
+            @NotNull
             @Override
-            protected NodeDelegate perform(@Nonnull NodeDelegate node) throws RepositoryException {
+            protected NodeDelegate perform(@NotNull NodeDelegate node) throws RepositoryException {
                 if (node.getStatus() != Status.UNCHANGED) {
                     throw new InvalidItemStateException(
                             "Unable to lock a node with pending changes");
@@ -175,7 +175,7 @@ public class LockManagerImpl implements
         LockDeprecation.handleCall("unlock");
         delegate.performVoid(new LockOperation<Void>(sessionContext, absPath, "unlock") {
             @Override
-            protected void performVoid(@Nonnull NodeDelegate node)
+            protected void performVoid(@NotNull NodeDelegate node)
                     throws RepositoryException {
                 String path = node.getPath();
                 if (canUnlock(node)) {
@@ -222,4 +222,4 @@ public class LockManagerImpl implements
         }
         return false;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockOperation.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockOperation.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/lock/LockOperation.java Wed Jul 18 14:45:45 2018
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.jcr.lock;
 
-import javax.annotation.Nonnull;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
 
@@ -24,6 +23,7 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate;
 import org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Abstract base class for locking operations.
@@ -47,7 +47,7 @@ public abstract class LockOperation<T> e
         return true;
     }
 
-    @Nonnull
+    @NotNull
     @Override
     public T perform() throws RepositoryException {
         session.refresh(true);
@@ -72,13 +72,13 @@ public abstract class LockOperation<T> e
         }
     }
 
-    @Nonnull
-    protected T perform(@Nonnull NodeDelegate node) throws RepositoryException {
+    @NotNull
+    protected T perform(@NotNull NodeDelegate node) throws RepositoryException {
         throw new UnsupportedOperationException();
     }
 
-    protected void performVoid(@Nonnull NodeDelegate node) throws RepositoryException {
+    protected void performVoid(@NotNull NodeDelegate node) throws RepositoryException {
         throw new UnsupportedOperationException();
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java Wed Jul 18 14:45:45 2018
@@ -33,7 +33,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 
-import javax.annotation.Nonnull;
 import javax.jcr.observation.Event;
 import javax.jcr.observation.EventIterator;
 import javax.jcr.observation.EventListener;
@@ -69,6 +68,7 @@ import org.apache.jackrabbit.oak.stats.M
 import org.apache.jackrabbit.oak.stats.StatisticManager;
 import org.apache.jackrabbit.oak.stats.TimerStats;
 import org.apache.jackrabbit.stats.TimeSeriesMax;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -232,7 +232,7 @@ class ChangeProcessor implements Filteri
         return filterProvider.get();
     }
 
-    @Nonnull
+    @NotNull
     public ChangeProcessorMBean getMBean() {
         return new ChangeProcessorMBean() {
 
@@ -480,9 +480,9 @@ class ChangeProcessor implements Filteri
     }
 
     @Override
-    public void contentChanged(@Nonnull NodeState before, 
-                               @Nonnull NodeState after,
-                               @Nonnull CommitInfo info) {
+    public void contentChanged(@NotNull NodeState before, 
+                               @NotNull NodeState after,
+                               @NotNull CommitInfo info) {
         checkNotNull(before); // OAK-5160 before is now guaranteed to be non-null
         checkNotNull(after);
         checkNotNull(info);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventQueue.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventQueue.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventQueue.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventQueue.java Wed Jul 18 14:45:45 2018
@@ -23,8 +23,6 @@ import static com.google.common.collect.
 import java.util.LinkedList;
 import java.util.NoSuchElementException;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.observation.Event;
 import javax.jcr.observation.EventIterator;
 
@@ -37,6 +35,8 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.observation.filter.EventFilter;
 import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Queue of JCR Events generated from a given content change
@@ -50,9 +50,9 @@ class EventQueue implements EventIterato
     private long position = 0;
 
     public EventQueue(
-            @Nonnull NamePathMapper mapper, CommitInfo info,
-            @Nonnull NodeState before, @Nonnull NodeState after,
-            @Nonnull Iterable<String> basePaths, @Nonnull EventFilter filter,
+            @NotNull NamePathMapper mapper, CommitInfo info,
+            @NotNull NodeState before, @NotNull NodeState after,
+            @NotNull Iterable<String> basePaths, @NotNull EventFilter filter,
             @Nullable EventAggregator aggregator) {
         this.generator = new EventGenerator();
         EventFactory factory = new EventFactory(mapper, info);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/OakEventFilterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/OakEventFilterImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/OakEventFilterImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/OakEventFilterImpl.java Wed Jul 18 14:45:45 2018
@@ -32,8 +32,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
 
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.api.observation.JackrabbitEventFilter;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.commons.PathUtils;
@@ -50,6 +48,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.observation.filter.PermissionProviderFactory;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Implements OakEventFilter which is an extension to the JackrabbitEventFilter
@@ -248,7 +247,7 @@ public class OakEventFilterImpl extends
 
     private Set<String> relativeGlobPaths;
 
-    public OakEventFilterImpl(@Nonnull JackrabbitEventFilter delegate) {
+    public OakEventFilterImpl(@NotNull JackrabbitEventFilter delegate) {
         checkNotNull(delegate);
         this.delegate = delegate;
     }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ObservationManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ObservationManagerImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ObservationManagerImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ObservationManagerImpl.java Wed Jul 18 14:45:45 2018
@@ -35,9 +35,6 @@ import java.util.List;
 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 javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
@@ -71,6 +68,8 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionProvider;
 import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
 import org.apache.jackrabbit.oak.stats.StatisticManager;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Marker;
@@ -123,7 +122,7 @@ public class ObservationManagerImpl impl
         this.commitRateLimiter = commitRateLimiter;
         this.permissionProviderFactory = new PermissionProviderFactory() {
             Set<Principal> principals = sessionDelegate.getAuthInfo().getPrincipals();
-            @Nonnull
+            @NotNull
             @Override
             public PermissionProvider create(Root root) {
                 return authorizationConfig.getPermissionProvider(root,
@@ -438,7 +437,7 @@ public class ObservationManagerImpl impl
      * @throws javax.jcr.RepositoryException     if an error occurs while reading from the
      *                                 node type manager.
      */
-    @CheckForNull
+    @Nullable
     private String[] validateNodeTypeNames(@Nullable String[] nodeTypeNames)
             throws NoSuchNodeTypeException, RepositoryException {
         if (nodeTypeNames == null) {

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java Wed Jul 18 14:45:45 2018
@@ -21,7 +21,6 @@ package org.apache.jackrabbit.oak.jcr.qu
 import java.util.HashMap;
 import java.util.List;
 
-import javax.annotation.Nonnull;
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
@@ -39,6 +38,7 @@ import org.apache.jackrabbit.oak.jcr.del
 import org.apache.jackrabbit.oak.jcr.session.NodeImpl;
 import org.apache.jackrabbit.oak.jcr.session.SessionContext;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * The implementation of the corresponding JCR interface.
@@ -81,7 +81,7 @@ public class QueryImpl implements Query
         }
         List<String> names = sessionContext.getSessionDelegate().perform(
                 new SessionOperation<List<String>>("parse") {
-                    @Nonnull
+                    @NotNull
                     @Override
                     public List<String> perform() throws RepositoryException {
                         return manager.parse(statement, language);
@@ -98,7 +98,7 @@ public class QueryImpl implements Query
     public QueryResult execute() throws RepositoryException {
         return sessionContext.getSessionDelegate().perform(
                 new SessionOperation<QueryResult>("execute") {
-                    @Nonnull
+                    @NotNull
                     @Override
                     public QueryResult perform() throws RepositoryException {
                         return manager.executeQuery(statement, language, limit,

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java Wed Jul 18 14:45:45 2018
@@ -22,7 +22,6 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import javax.annotation.CheckForNull;
 import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
@@ -41,6 +40,7 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate;
 import org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate;
 import org.apache.jackrabbit.oak.plugins.value.jcr.ValueFactoryImpl;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -145,7 +145,7 @@ public class QueryResultImpl implements
         };
     }
 
-    @CheckForNull
+    @Nullable
     NodeImpl<? extends NodeDelegate> getNode(Tree tree) throws RepositoryException {
         if (tree != null && tree.exists()) {
             NodeDelegate node = new NodeDelegate(sessionDelegate, tree);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java Wed Jul 18 14:45:45 2018
@@ -32,9 +32,6 @@ import java.util.concurrent.ThreadFactor
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.Credentials;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
@@ -71,6 +68,8 @@ import org.apache.jackrabbit.oak.spi.whi
 import org.apache.jackrabbit.oak.stats.Clock;
 import org.apache.jackrabbit.oak.stats.StatisticManager;
 import org.apache.jackrabbit.oak.spi.descriptors.GenericDescriptors;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -132,18 +131,18 @@ public class RepositoryImpl implements J
     /**
      * Constructor used for backward compatibility.
      */
-    public RepositoryImpl(@Nonnull ContentRepository contentRepository,
-                          @Nonnull Whiteboard whiteboard,
-                          @Nonnull SecurityProvider securityProvider,
+    public RepositoryImpl(@NotNull ContentRepository contentRepository,
+                          @NotNull Whiteboard whiteboard,
+                          @NotNull SecurityProvider securityProvider,
                           int observationQueueLength,
                           CommitRateLimiter commitRateLimiter) {
         this(contentRepository, whiteboard, securityProvider, 
                 observationQueueLength, commitRateLimiter, false);
     }
     
-    public RepositoryImpl(@Nonnull ContentRepository contentRepository,
-                          @Nonnull Whiteboard whiteboard,
-                          @Nonnull SecurityProvider securityProvider,
+    public RepositoryImpl(@NotNull ContentRepository contentRepository,
+                          @NotNull Whiteboard whiteboard,
+                          @NotNull SecurityProvider securityProvider,
                           int observationQueueLength,
                           CommitRateLimiter commitRateLimiter,
                           boolean fastQueryResultSize) {
@@ -267,8 +266,8 @@ public class RepositoryImpl implements J
     //------------------------------------------------------------< JackrabbitRepository >---
 
     @Override
-    public Session login(@CheckForNull Credentials credentials, @CheckForNull String workspaceName,
-            @CheckForNull Map<String, Object> attributes) throws RepositoryException {
+    public Session login(@Nullable Credentials credentials, @Nullable String workspaceName,
+            @Nullable Map<String, Object> attributes) throws RepositoryException {
         try {
             if (attributes == null) {
                 attributes = emptyMap();
@@ -375,7 +374,7 @@ public class RepositoryImpl implements J
         ThreadFactory tf = new ThreadFactory() {
             private final AtomicLong counter = new AtomicLong();
             @Override
-            public Thread newThread(@Nonnull Runnable r) {
+            public Thread newThread(@NotNull Runnable r) {
                 Thread t = new Thread(r, newName());
                 t.setDaemon(true);
                 return t;

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/AccessManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/AccessManager.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/AccessManager.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/AccessManager.java Wed Jul 18 14:45:45 2018
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.oak.jcr.security;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.RepositoryException;
 
@@ -26,6 +24,8 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate;
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionProvider;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * AccessManager
@@ -40,9 +40,9 @@ public class AccessManager {
         this.permissionProvider = permissionProvider;
     }
 
-    public boolean hasPermissions(@Nonnull final String oakPath, @Nonnull final String actions) {
+    public boolean hasPermissions(@NotNull final String oakPath, @NotNull final String actions) {
         return delegate.safePerform(new SessionOperation<Boolean>("hasPermissions") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return permissionProvider.isGranted(oakPath, actions);
@@ -50,9 +50,9 @@ public class AccessManager {
         });
     }
 
-    public boolean hasPermissions(@Nonnull final Tree tree, @Nullable final PropertyState property, final long permissions) throws RepositoryException {
+    public boolean hasPermissions(@NotNull final Tree tree, @Nullable final PropertyState property, final long permissions) throws RepositoryException {
         return delegate.safePerform(new SessionOperation<Boolean>("hasPermissions") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return permissionProvider.isGranted(tree, property, permissions);
@@ -60,13 +60,13 @@ public class AccessManager {
         });
     }
 
-    public void checkPermissions(@Nonnull String oakPath, @Nonnull String actions) throws RepositoryException {
+    public void checkPermissions(@NotNull String oakPath, @NotNull String actions) throws RepositoryException {
         if (!hasPermissions(oakPath, actions)) {
             throw new AccessDeniedException("Access denied.");
         }
     }
 
-    public void checkPermissions(@Nonnull Tree tree, @Nullable PropertyState property, long permissions) throws RepositoryException {
+    public void checkPermissions(@NotNull Tree tree, @Nullable PropertyState property, long permissions) throws RepositoryException {
         if (!hasPermissions(tree, property, permissions)) {
             throw new AccessDeniedException("Access denied.");
         }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java Wed Jul 18 14:45:45 2018
@@ -28,7 +28,6 @@ import static org.apache.jackrabbit.oak.
 
 import java.util.List;
 
-import javax.annotation.Nonnull;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.Item;
@@ -53,6 +52,7 @@ import org.apache.jackrabbit.oak.jcr.ses
 import org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyBuilder;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.ReadWriteNodeTypeManager;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -107,8 +107,8 @@ abstract class ItemImpl<T extends ItemDe
      * @return  the result of {@code op.perform()}
      * @throws RepositoryException as thrown by {@code op.perform()}.
      */
-    @Nonnull
-    protected final <U> U perform(@Nonnull SessionOperation<U> op) throws RepositoryException {
+    @NotNull
+    protected final <U> U perform(@NotNull SessionOperation<U> op) throws RepositoryException {
         return sessionDelegate.perform(op);
     }
 
@@ -118,10 +118,10 @@ abstract class ItemImpl<T extends ItemDe
      * @see javax.jcr.Item#getName()
      */
     @Override
-    @Nonnull
+    @NotNull
     public String getName() throws RepositoryException {
         String oakName = perform(new ItemOperation<String>(dlg, "getName") {
-            @Nonnull
+            @NotNull
             @Override
             public String perform() {
                 return item.getName();
@@ -135,10 +135,10 @@ abstract class ItemImpl<T extends ItemDe
      * @see javax.jcr.Property#getPath()
      */
     @Override
-    @Nonnull
+    @NotNull
     public String getPath() throws RepositoryException {
         return toJcrPath(perform(new ItemOperation<String>(dlg, "getPath") {
-            @Nonnull
+            @NotNull
             @Override
             public String perform() {
                 return item.getPath();
@@ -146,7 +146,7 @@ abstract class ItemImpl<T extends ItemDe
         }));
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Session getSession() {
         return sessionContext.getSession();
     }
@@ -161,7 +161,7 @@ abstract class ItemImpl<T extends ItemDe
         }
 
         ItemDelegate ancestor = perform(new ItemOperation<ItemDelegate>(dlg, "getAncestor") {
-            @Nonnull
+            @NotNull
             @Override
             public ItemDelegate perform() throws RepositoryException {
                 String path = item.getPath();
@@ -313,22 +313,22 @@ abstract class ItemImpl<T extends ItemDe
     }
 
     //-----------------------------------------------------------< internal >---
-    @Nonnull
+    @NotNull
     String getOakName(String name) throws RepositoryException {
         return sessionContext.getOakName(name);
     }
 
-    @Nonnull
+    @NotNull
     String getOakPathOrThrow(String jcrPath) throws RepositoryException {
         return sessionContext.getOakPathOrThrow(jcrPath);
     }
 
-    @Nonnull
+    @NotNull
     String getOakPathOrThrowNotFound(String relPath) throws PathNotFoundException {
         return sessionContext.getOakPathOrThrowNotFound(relPath);
     }
 
-    @Nonnull
+    @NotNull
     String toJcrPath(String oakPath) {
         return sessionContext.getJcrPath(oakPath);
     }
@@ -338,22 +338,22 @@ abstract class ItemImpl<T extends ItemDe
      *
      * @return the value factory
      */
-    @Nonnull
+    @NotNull
     ValueFactory getValueFactory() {
         return sessionContext.getValueFactory();
     }
 
-    @Nonnull
+    @NotNull
     ReadWriteNodeTypeManager getNodeTypeManager() {
         return sessionContext.getWorkspace().getNodeTypeManager();
     }
 
-    @Nonnull
+    @NotNull
     VersionManager getVersionManager() throws RepositoryException {
         return sessionContext.getWorkspace().getVersionManager();
     }
 
-    @Nonnull
+    @NotNull
     protected PropertyState createSingleState(
             String oakName, Value value, Type<?> type)
             throws RepositoryException {
@@ -367,7 +367,7 @@ abstract class ItemImpl<T extends ItemDe
         }
     }
 
-    @Nonnull
+    @NotNull
     protected PropertyState createMultiState(
             String oakName, List<Value> values, Type<?> type)
             throws RepositoryException {

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/NodeImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/NodeImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/NodeImpl.java Wed Jul 18 14:45:45 2018
@@ -37,8 +37,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Binary;
 import javax.jcr.InvalidItemStateException;
@@ -97,6 +95,8 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.Permissions;
 import org.apache.jackrabbit.oak.plugins.tree.TreeUtil;
 import org.apache.jackrabbit.value.ValueHelper;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -118,9 +118,9 @@ public class NodeImpl<T extends NodeDele
      */
     private static final Logger LOG = LoggerFactory.getLogger(NodeImpl.class);
 
-    @CheckForNull
+    @Nullable
     public static NodeImpl<? extends NodeDelegate> createNodeOrNull(
-            @CheckForNull NodeDelegate delegate, @Nonnull SessionContext context)
+            @Nullable NodeDelegate delegate, @NotNull SessionContext context)
             throws RepositoryException {
         if (delegate != null) {
             return createNode(delegate, context);
@@ -129,9 +129,9 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Nonnull
+    @NotNull
     public static NodeImpl<? extends NodeDelegate> createNode(
-                @Nonnull NodeDelegate delegate, @Nonnull SessionContext context)
+                @NotNull NodeDelegate delegate, @NotNull SessionContext context)
                 throws RepositoryException {
         PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
         String type = pd != null ? pd.getString() : null;
@@ -166,10 +166,10 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Item#getParent()
      */
     @Override
-    @Nonnull
+    @NotNull
     public Node getParent() throws RepositoryException {
         return perform(new NodeOperation<Node>(dlg, "getParent") {
-            @Nonnull
+            @NotNull
             @Override
             public Node perform() throws RepositoryException {
                 if (node.isRoot()) {
@@ -191,7 +191,7 @@ public class NodeImpl<T extends NodeDele
     @Override
     public boolean isNew() {
         return sessionDelegate.safePerform(new NodeOperation<Boolean>(dlg, "isNew") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return node.exists() && node.getStatus() == Status.NEW;
@@ -205,7 +205,7 @@ public class NodeImpl<T extends NodeDele
     @Override
     public boolean isModified() {
         return sessionDelegate.safePerform(new NodeOperation<Boolean>(dlg, "isModified") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return node.exists() && node.getStatus() == Status.MODIFIED;
@@ -246,12 +246,12 @@ public class NodeImpl<T extends NodeDele
      * @see Node#addNode(String)
      */
     @Override
-    @Nonnull
+    @NotNull
     public Node addNode(String relPath) throws RepositoryException {
         return addNode(relPath, null);
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Node addNode(final String relPath, String primaryNodeTypeName)
             throws RepositoryException {
         final String oakPath = getOakPathOrThrowNotFound(relPath);
@@ -264,7 +264,7 @@ public class NodeImpl<T extends NodeDele
 
         checkIndexOnName(relPath);
         return perform(new ItemWriteOperation<Node>("addNode") {
-            @Nonnull
+            @NotNull
             @Override
             public Node perform() throws RepositoryException {
                 String oakName = PathUtils.getName(oakPath);
@@ -347,7 +347,7 @@ public class NodeImpl<T extends NodeDele
     // of the methods will ever return null, even if asked to remove
     // a non-existing property! See internalRemoveProperty() for details.
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Value value)
             throws RepositoryException {
         if (value != null) {
@@ -357,7 +357,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Value value, int type)
             throws RepositoryException {
         if (value != null) {
@@ -373,7 +373,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Value[] values)
             throws RepositoryException {
         if (values != null) {
@@ -384,7 +384,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String jcrName, Value[] values, int type)
             throws RepositoryException {
         if (values != null) {
@@ -400,7 +400,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, String[] values)
             throws RepositoryException {
         if (values != null) {
@@ -412,7 +412,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, String[] values, int type)
             throws RepositoryException {
         if (values != null) {
@@ -428,7 +428,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, String value)
             throws RepositoryException {
         if (value != null) {
@@ -439,7 +439,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, String value, int type)
             throws RepositoryException {
         if (value != null) {
@@ -455,7 +455,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull @SuppressWarnings("deprecation")
+    @Override @NotNull @SuppressWarnings("deprecation")
     public Property setProperty(String name, InputStream value)
             throws RepositoryException {
         if (value != null) {
@@ -466,7 +466,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Binary value)
             throws RepositoryException {
         if (value != null) {
@@ -477,21 +477,21 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, boolean value)
             throws RepositoryException {
         Value v = getValueFactory().createValue(value);
         return internalSetProperty(name, v, false);
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, double value)
             throws RepositoryException {
         Value v = getValueFactory().createValue(value);
         return internalSetProperty(name, v, false);
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, BigDecimal value)
             throws RepositoryException {
         if (value != null) {
@@ -502,14 +502,14 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, long value)
             throws RepositoryException {
         Value v = getValueFactory().createValue(value);
         return internalSetProperty(name, v, false);
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Calendar value)
             throws RepositoryException {
         if (value != null) {
@@ -520,7 +520,7 @@ public class NodeImpl<T extends NodeDele
         }
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Property setProperty(String name, Node value)
             throws RepositoryException {
         if (value != null) {
@@ -532,11 +532,11 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Node getNode(String relPath) throws RepositoryException {
         final String oakPath = getOakPathOrThrowNotFound(relPath);
         return perform(new NodeOperation<Node>(dlg, "getNode") {
-            @Nonnull
+            @NotNull
             @Override
             public Node perform() throws RepositoryException {
                 NodeDelegate nd = node.getChild(oakPath);
@@ -550,10 +550,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public NodeIterator getNodes() throws RepositoryException {
         return perform(new NodeOperation<NodeIterator>(dlg, "getNodes") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeIterator perform() throws RepositoryException {
                 Iterator<NodeDelegate> children = node.getChildren();
@@ -580,11 +580,11 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public NodeIterator getNodes(final String namePattern)
             throws RepositoryException {
         return perform(new NodeOperation<NodeIterator>(dlg, "getNodes") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeIterator perform() throws RepositoryException {
                 Iterator<NodeDelegate> children = Iterators.filter(
@@ -602,10 +602,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public NodeIterator getNodes(final String[] nameGlobs) throws RepositoryException {
         return perform(new NodeOperation<NodeIterator>(dlg, "getNodes") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeIterator perform() throws RepositoryException {
                 Iterator<NodeDelegate> children = Iterators.filter(
@@ -623,11 +623,11 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Property getProperty(String relPath) throws RepositoryException {
         final String oakPath = getOakPathOrThrowNotFound(relPath);
         return perform(new NodeOperation<PropertyImpl>(dlg, "getProperty") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyImpl perform() throws RepositoryException {
                 PropertyDelegate pd = node.getPropertyOrNull(oakPath);
@@ -642,10 +642,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getProperties() throws RepositoryException {
         return perform(new NodeOperation<PropertyIterator>(dlg, "getProperties") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyIterator perform() throws RepositoryException {
                 Iterator<PropertyDelegate> properties = node.getProperties();
@@ -657,10 +657,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getProperties(final String namePattern) throws RepositoryException {
         return perform(new NodeOperation<PropertyIterator>(dlg, "getProperties") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyIterator perform() throws RepositoryException {
                 final PropertyIteratorDelegate delegate = new PropertyIteratorDelegate(node, new Predicate<PropertyDelegate>() {
@@ -681,10 +681,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getProperties(final String[] nameGlobs) throws RepositoryException {
         return perform(new NodeOperation<PropertyIterator>(dlg, "getProperties") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyIterator perform() throws RepositoryException {
                 final PropertyIteratorDelegate delegate = new PropertyIteratorDelegate(node, new Predicate<PropertyDelegate>() {
@@ -708,10 +708,10 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getPrimaryItem()
      */
     @Override
-    @Nonnull
+    @NotNull
     public Item getPrimaryItem() throws RepositoryException {
         return perform(new NodeOperation<Item>(dlg, "getPrimaryItem") {
-            @Nonnull
+            @NotNull
             @Override
             public Item perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -737,10 +737,10 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getUUID()
      */
     @Override
-    @Nonnull
+    @NotNull
     public String getUUID() throws RepositoryException {
         return perform(new NodeOperation<String>(dlg, "getUUID") {
-            @Nonnull
+            @NotNull
             @Override
             public String perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -753,11 +753,11 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public String getIdentifier() throws RepositoryException {
         // TODO: name mapping for path identifiers
         return perform(new NodeOperation<String>(dlg, "getIdentifier") {
-            @Nonnull
+            @NotNull
             @Override
             public String perform() throws RepositoryException {
                 return node.getIdentifier();
@@ -773,7 +773,7 @@ public class NodeImpl<T extends NodeDele
 
     private PropertyIterator internalGetReferences(final String name, final boolean weak) throws RepositoryException {
         return perform(new NodeOperation<PropertyIterator>(dlg, "internalGetReferences") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyIterator perform() throws InvalidItemStateException {
                 IdentifierManager idManager = sessionDelegate.getIdManager();
@@ -799,13 +799,13 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getReferences()
      */
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getReferences() throws RepositoryException {
         return internalGetReferences(null, false);
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getReferences(final String name) throws RepositoryException {
         return internalGetReferences(name, false);
     }
@@ -814,13 +814,13 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getWeakReferences()
      */
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getWeakReferences() throws RepositoryException {
         return internalGetReferences(null, true);
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyIterator getWeakReferences(String name) throws RepositoryException {
         return internalGetReferences(name, true);
     }
@@ -830,7 +830,7 @@ public class NodeImpl<T extends NodeDele
         try {
             final String oakPath = getOakPathOrThrow(relPath);
             return perform(new NodeOperation<Boolean>(dlg, "hasNode") {
-                @Nonnull
+                @NotNull
                 @Override
                 public Boolean perform() throws RepositoryException {
                     return node.getChild(oakPath) != null;
@@ -846,7 +846,7 @@ public class NodeImpl<T extends NodeDele
         try {
             final String oakPath = getOakPathOrThrow(relPath);
             return perform(new NodeOperation<Boolean>(dlg, "hasProperty") {
-                @Nonnull
+                @NotNull
                 @Override
                 public Boolean perform() throws RepositoryException {
                     return node.getPropertyOrNull(oakPath) != null;
@@ -865,7 +865,7 @@ public class NodeImpl<T extends NodeDele
     @Override
     public boolean hasProperties() throws RepositoryException {
         return perform(new NodeOperation<Boolean>(dlg, "hasProperties") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() throws RepositoryException {
                 return node.getPropertyCount() != 0;
@@ -877,10 +877,10 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getPrimaryNodeType()
      */
     @Override
-    @Nonnull
+    @NotNull
     public NodeType getPrimaryNodeType() throws RepositoryException {
         return perform(new NodeOperation<NodeType>(dlg, "getPrimaryNodeType") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeType perform() throws RepositoryException {
                 Tree tree = node.getTree();
@@ -898,10 +898,10 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getMixinNodeTypes()
      */
     @Override
-    @Nonnull
+    @NotNull
     public NodeType[] getMixinNodeTypes() throws RepositoryException {
         return perform(new NodeOperation<NodeType[]>(dlg, "getMixinNodeTypes") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeType[] perform() throws RepositoryException {
                 Tree tree = node.getTree();
@@ -925,7 +925,7 @@ public class NodeImpl<T extends NodeDele
     public boolean isNodeType(String nodeTypeName) throws RepositoryException {
         final String oakName = getOakName(nodeTypeName);
         return perform(new NodeOperation<Boolean>(dlg, "isNodeType") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() throws RepositoryException {
                 Tree tree = node.getTree();
@@ -1007,7 +1007,7 @@ public class NodeImpl<T extends NodeDele
     public boolean canAddMixin(String mixinName) throws RepositoryException {
         final String oakTypeName = getOakName(mixinName);
         return perform(new NodeOperation<Boolean>(dlg, "canAddMixin") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() throws RepositoryException {
                 PropertyState prop = PropertyStates.createProperty(JCR_MIXINTYPES, singleton(oakTypeName), NAMES);
@@ -1021,10 +1021,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public NodeDefinition getDefinition() throws RepositoryException {
         return perform(new NodeOperation<NodeDefinition>(dlg, "getDefinition") {
-            @Nonnull
+            @NotNull
             @Override
             public NodeDefinition perform() throws RepositoryException {
                 NodeDelegate parent = node.getParent();
@@ -1039,10 +1039,10 @@ public class NodeImpl<T extends NodeDele
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public String getCorrespondingNodePath(final String workspaceName) throws RepositoryException {
         return toJcrPath(perform(new ItemOperation<String>(dlg, "getCorrespondingNodePath") {
-            @Nonnull
+            @NotNull
             @Override
             public String perform() throws RepositoryException {
                 checkValidWorkspace(workspaceName);
@@ -1081,7 +1081,7 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#checkin()
      */
     @Override
-    @Nonnull
+    @NotNull
     public Version checkin() throws RepositoryException {
         return getVersionManager().checkin(getPath());
     }
@@ -1114,7 +1114,7 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#merge(String, boolean)
      */
     @Override
-    @Nonnull
+    @NotNull
     public NodeIterator merge(String srcWorkspace, boolean bestEffort) throws RepositoryException {
         return getVersionManager().merge(getPath(), srcWorkspace, bestEffort);
     }
@@ -1188,7 +1188,7 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getVersionHistory()
      */
     @Override
-    @Nonnull
+    @NotNull
     public VersionHistory getVersionHistory() throws RepositoryException {
         return getVersionManager().getVersionHistory(getPath());
     }
@@ -1197,7 +1197,7 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getBaseVersion()
      */
     @Override
-    @Nonnull
+    @NotNull
     public Version getBaseVersion() throws RepositoryException {
         return getVersionManager().getBaseVersion(getPath());
     }
@@ -1219,12 +1219,12 @@ public class NodeImpl<T extends NodeDele
         return getLockManager().holdsLock(getPath());
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Lock getLock() throws RepositoryException {
         return getLockManager().getLock(getPath());
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public Lock lock(boolean isDeep, boolean isSessionScoped)
             throws RepositoryException {
         return getLockManager().lock(
@@ -1236,7 +1236,7 @@ public class NodeImpl<T extends NodeDele
         getLockManager().unlock(getPath());
     }
 
-    @Override @Nonnull
+    @Override @NotNull
     public NodeIterator getSharedSet() {
         return new NodeIteratorAdapter(singleton(this));
     }
@@ -1272,15 +1272,15 @@ public class NodeImpl<T extends NodeDele
      * @see javax.jcr.Node#getAllowedLifecycleTransistions()
      */
     @Override
-    @Nonnull
+    @NotNull
     public String[] getAllowedLifecycleTransistions() throws RepositoryException {
         throw new UnsupportedRepositoryOperationException("Lifecycle Management is not supported");
 
     }
 
     //------------------------------------------------------------< internal >---
-    @CheckForNull
-    private String getPrimaryTypeName(@Nonnull Tree tree) {
+    @Nullable
+    private String getPrimaryTypeName(@NotNull Tree tree) {
         String primaryTypeName = null;
         if (tree.hasProperty(JcrConstants.JCR_PRIMARYTYPE)) {
             primaryTypeName = TreeUtil.getPrimaryTypeName(tree);
@@ -1292,8 +1292,8 @@ public class NodeImpl<T extends NodeDele
         return primaryTypeName;
     }
 
-    @Nonnull
-    private Iterator<String> getMixinTypeNames(@Nonnull Tree tree) {
+    @NotNull
+    private Iterator<String> getMixinTypeNames(@NotNull Tree tree) {
         Iterator<String> mixinNames = Collections.emptyIterator();
         if (tree.hasProperty(JcrConstants.JCR_MIXINTYPES)) {
             mixinNames = TreeUtil.getNames(tree, JcrConstants.JCR_MIXINTYPES).iterator();
@@ -1372,7 +1372,7 @@ public class NodeImpl<T extends NodeDele
                             "Cannot set property. Node [%s] is checked in.", getNodePath()));
                 }
             }
-            @Nonnull
+            @NotNull
             @Override
             public Property perform() throws RepositoryException {
                 return new PropertyImpl(
@@ -1408,7 +1408,7 @@ public class NodeImpl<T extends NodeDele
                             "Cannot set property. Node [%s] is checked in.", getNodePath()));
                 }
             }
-            @Nonnull
+            @NotNull
             @Override
             public Property perform() throws RepositoryException {
                 return new PropertyImpl(
@@ -1455,7 +1455,7 @@ public class NodeImpl<T extends NodeDele
                             "Cannot remove property. Node [%s] is checked in.", getNodePath()));
                 }
             }
-            @Nonnull
+            @NotNull
             @Override
             public Property perform() throws RepositoryException {
                 PropertyDelegate property = dlg.getPropertyOrNull(oakName);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/PropertyImpl.java Wed Jul 18 14:45:45 2018
@@ -23,7 +23,6 @@ import java.math.BigDecimal;
 import java.util.Calendar;
 import java.util.List;
 
-import javax.annotation.Nonnull;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Binary;
 import javax.jcr.ItemNotFoundException;
@@ -47,6 +46,7 @@ import org.apache.jackrabbit.oak.jcr.del
 import org.apache.jackrabbit.oak.jcr.session.operation.PropertyOperation;
 import org.apache.jackrabbit.oak.plugins.value.jcr.ValueFactoryImpl;
 import org.apache.jackrabbit.value.ValueHelper;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -70,10 +70,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Node getParent() throws RepositoryException {
         return perform(new PropertyOperation<Node>(dlg, "getParent") {
-            @Nonnull
+            @NotNull
             @Override
             public Node perform() throws RepositoryException {
                 NodeDelegate parent = property.getParent();
@@ -89,7 +89,7 @@ public class PropertyImpl extends ItemIm
     @Override
     public boolean isNew() {
         return sessionDelegate.safePerform(new PropertyOperation<Boolean>(dlg, "isNew") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return property.getStatus() == Status.NEW;
@@ -100,7 +100,7 @@ public class PropertyImpl extends ItemIm
     @Override
     public boolean isModified() {
         return sessionDelegate.safePerform(new PropertyOperation<Boolean>(dlg, "isModified") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() {
                 return property.getStatus() == Status.MODIFIED;
@@ -243,10 +243,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Value getValue() throws RepositoryException {
         return perform(new PropertyOperation<Value>(dlg, "getValue") {
-            @Nonnull
+            @NotNull
             @Override
             public Value perform() throws RepositoryException {
                 return ValueFactoryImpl.createValue(
@@ -256,10 +256,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Value[] getValues() throws RepositoryException {
         return perform(new PropertyOperation<List<Value>>(dlg, "getValues") {
-            @Nonnull
+            @NotNull
             @Override
             public List<Value> perform() throws RepositoryException {
                 return ValueFactoryImpl.createValues(
@@ -269,20 +269,20 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public String getString() throws RepositoryException {
         return getValue().getString();
     }
 
     @SuppressWarnings("deprecation")
     @Override
-    @Nonnull
+    @NotNull
     public InputStream getStream() throws RepositoryException {
         return getValue().getStream();
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Binary getBinary() throws RepositoryException {
         return getValue().getBinary();
     }
@@ -298,13 +298,13 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public BigDecimal getDecimal() throws RepositoryException {
         return getValue().getDecimal();
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Calendar getDate() throws RepositoryException {
         return getValue().getDate();
     }
@@ -315,10 +315,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Node getNode() throws RepositoryException {
         return perform(new PropertyOperation<Node>(dlg, "getNode") {
-            @Nonnull
+            @NotNull
             @Override
             public Node perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -369,10 +369,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Property getProperty() throws RepositoryException {
         return perform(new PropertyOperation<Property>(dlg, "getProperty") {
-            @Nonnull
+            @NotNull
             @Override
             public Property perform() throws RepositoryException {
                 // TODO: avoid nested calls
@@ -394,7 +394,7 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public long[] getLengths() throws RepositoryException {
         Value[] values = getValues();
         long[] lengths = new long[values.length];
@@ -406,10 +406,10 @@ public class PropertyImpl extends ItemIm
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public PropertyDefinition getDefinition() throws RepositoryException {
         return perform(new PropertyOperation<PropertyDefinition>(dlg, "getDefinition") {
-            @Nonnull
+            @NotNull
             @Override
             public PropertyDefinition perform() throws RepositoryException {
                 return getNodeTypeManager().getDefinition(
@@ -422,7 +422,7 @@ public class PropertyImpl extends ItemIm
     @Override
     public int getType() throws RepositoryException {
         return perform(new PropertyOperation<Integer>(dlg, "getType") {
-            @Nonnull
+            @NotNull
             @Override
             public Integer perform() throws RepositoryException {
                 return property.getPropertyState().getType().tag();
@@ -433,7 +433,7 @@ public class PropertyImpl extends ItemIm
     @Override
     public boolean isMultiple() throws RepositoryException {
         return perform(new PropertyOperation<Boolean>(dlg, "isMultiple") {
-            @Nonnull
+            @NotNull
             @Override
             public Boolean perform() throws RepositoryException {
                 return property.getPropertyState().isArray();
@@ -458,7 +458,7 @@ public class PropertyImpl extends ItemIm
         }
     }
 
-    private void internalSetValue(@Nonnull final Value value)
+    private void internalSetValue(@NotNull final Value value)
             throws RepositoryException {
         sessionDelegate.performVoid(new ItemWriteOperation<Void>("internalSetValue") {
             @Override
@@ -490,7 +490,7 @@ public class PropertyImpl extends ItemIm
         });
     }
 
-    private void internalSetValue(@Nonnull final Value[] values)
+    private void internalSetValue(@NotNull final Value[] values)
             throws RepositoryException {
         if (values.length > MV_PROPERTY_WARN_THRESHOLD) {
             LOG.warn("Large multi valued property [{}] detected ({} values).",dlg.getPath(), values.length);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java?rev=1836182&r1=1836181&r2=1836182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/SessionContext.java Wed Jul 18 14:45:45 2018
@@ -26,9 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
@@ -70,6 +67,8 @@ import org.apache.jackrabbit.oak.stats.S
 import org.apache.jackrabbit.oak.stats.CounterStats;
 import org.apache.jackrabbit.oak.stats.MeterStats;
 import org.apache.jackrabbit.oak.stats.TimerStats;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -115,9 +114,9 @@ public class SessionContext implements N
     private final boolean fastQueryResultSize;
 
     public SessionContext(
-             @Nonnull Repository repository, @Nonnull StatisticManager statisticManager,
-             @Nonnull SecurityProvider securityProvider, @Nonnull Whiteboard whiteboard,
-             @Nonnull Map<String, Object> attributes, @Nonnull final SessionDelegate delegate,
+             @NotNull Repository repository, @NotNull StatisticManager statisticManager,
+             @NotNull SecurityProvider securityProvider, @NotNull Whiteboard whiteboard,
+             @NotNull Map<String, Object> attributes, @NotNull final SessionDelegate delegate,
              int observationQueueLength, CommitRateLimiter commitRateLimiter) {
         
         this(repository, statisticManager, securityProvider, whiteboard, attributes, delegate,
@@ -125,9 +124,9 @@ public class SessionContext implements N
     }
 
     public SessionContext(
-            @Nonnull Repository repository, @Nonnull StatisticManager statisticManager,
-            @Nonnull SecurityProvider securityProvider, @Nonnull Whiteboard whiteboard,
-            @Nonnull Map<String, Object> attributes, @Nonnull final SessionDelegate delegate,
+            @NotNull Repository repository, @NotNull StatisticManager statisticManager,
+            @NotNull SecurityProvider securityProvider, @NotNull Whiteboard whiteboard,
+            @NotNull Map<String, Object> attributes, @NotNull final SessionDelegate delegate,
             int observationQueueLength, CommitRateLimiter commitRateLimiter,
             MountInfoProvider mountInfoProvider, boolean fastQueryResultSize) {
         this.repository = checkNotNull(repository);
@@ -189,32 +188,32 @@ public class SessionContext implements N
         return new WorkspaceImpl(this);
     }
 
-    @Nonnull
+    @NotNull
     public StatisticManager getStatisticManager() {
         return statisticManager;
     }
 
-    @Nonnull
+    @NotNull
     public MeterStats getMeter(Type type){
         return statisticManager.getMeter(type);
     }
 
-    @Nonnull
+    @NotNull
     public TimerStats getTimer(Type type) {
         return statisticManager.getTimer(type);
     }
 
-    @Nonnull
+    @NotNull
     public CounterStats getCount(Type type) {
         return statisticManager.getStatsCounter(type);
     }
 
-    @Nonnull
+    @NotNull
     public Repository getRepository() {
         return repository;
     }
 
-    @Nonnull
+    @NotNull
     public SessionDelegate getSessionDelegate() {
         return delegate;
     }
@@ -224,7 +223,7 @@ public class SessionContext implements N
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public Map<String, String> getSessionLocalMappings() {
         return getNamespaces().getSessionLocalMappings();
     }
@@ -233,7 +232,7 @@ public class SessionContext implements N
         return valueFactory;
     }
 
-    @Nonnull
+    @NotNull
     public AccessControlManager getAccessControlManager() throws RepositoryException {
         if (accessControlManager == null) {
             AccessControlManager acm = getConfig(AuthorizationConfiguration.class)
@@ -248,7 +247,7 @@ public class SessionContext implements N
         return accessControlManager;
     }
 
-    @Nonnull
+    @NotNull
     public PrincipalManager getPrincipalManager() {
         if (principalManager == null) {
             principalManager = new PrincipalManagerDelegator(delegate,
@@ -258,7 +257,7 @@ public class SessionContext implements N
         return principalManager;
     }
 
-    @Nonnull
+    @NotNull
     public UserManager getUserManager() {
         if (userManager == null) {
             userManager = new UserManagerDelegator(delegate, getConfig(UserConfiguration.class)
@@ -267,7 +266,7 @@ public class SessionContext implements N
         return userManager;
     }
 
-    @Nonnull
+    @NotNull
     public PrivilegeManager getPrivilegeManager() {
         if (privilegeManager == null) {
             privilegeManager = new PrivilegeManagerDelegator(delegate,
@@ -277,7 +276,7 @@ public class SessionContext implements N
         return privilegeManager;
     }
 
-    @Nonnull
+    @NotNull
     public List<ProtectedItemImporter> getProtectedItemImporters() {
         // TODO: take non-security related importers into account as well (proper configuration)
         List<ProtectedItemImporter> importers = new ArrayList<ProtectedItemImporter>();
@@ -288,7 +287,7 @@ public class SessionContext implements N
     }
 
 
-    @Nonnull
+    @NotNull
     public ObservationManager getObservationManager() throws UnsupportedRepositoryOperationException {
         if (observationManager == null) {
             observationManager = new ObservationManagerImpl(
@@ -329,31 +328,31 @@ public class SessionContext implements N
     //-----------------------------------------------------< NamePathMapper >---
 
     @Override
-    @Nonnull
-    public String getOakName(@Nonnull String jcrName) throws RepositoryException {
+    @NotNull
+    public String getOakName(@NotNull String jcrName) throws RepositoryException {
         return namePathMapper.getOakName(jcrName);
     }
 
     @Override
-    @CheckForNull
-    public String getOakNameOrNull(@Nonnull String jcrName) {
+    @Nullable
+    public String getOakNameOrNull(@NotNull String jcrName) {
         return namePathMapper.getOakNameOrNull(jcrName);
     }
 
-    @Nonnull
+    @NotNull
     @Override
-    public String getJcrName(@Nonnull String oakName) {
+    public String getJcrName(@NotNull String oakName) {
         return namePathMapper.getJcrName(oakName);
     }
 
     @Override
-    @CheckForNull
+    @Nullable
     public String getOakPath(String jcrPath) {
         return namePathMapper.getOakPath(jcrPath);
     }
 
     @Override
-    @Nonnull
+    @NotNull
     public String getJcrPath(String oakPath) {
         return namePathMapper.getJcrPath(oakPath);
     }
@@ -366,7 +365,7 @@ public class SessionContext implements N
      * @return Oak path
      * @throws javax.jcr.RepositoryException if the path can not be mapped
      */
-    @Nonnull
+    @NotNull
     public String getOakPathOrThrow(String jcrPath) throws RepositoryException {
         String oakPath = getOakPath(jcrPath);
         if (oakPath != null) {
@@ -384,7 +383,7 @@ public class SessionContext implements N
      * @return Oak path
      * @throws javax.jcr.PathNotFoundException if the path can not be mapped
      */
-    @Nonnull
+    @NotNull
     public String getOakPathOrThrowNotFound(String jcrPath) throws PathNotFoundException {
         String oakPath = getOakPath(jcrPath);
         if (oakPath != null) {
@@ -394,7 +393,7 @@ public class SessionContext implements N
         }
     }
 
-    @Nonnull
+    @NotNull
     public AccessManager getAccessManager() throws RepositoryException {
         if (accessManager == null) {
             accessManager = new AccessManager(delegate, delegate.getPermissionProvider());
@@ -402,7 +401,7 @@ public class SessionContext implements N
         return accessManager;
     }
 
-    @Nonnull
+    @NotNull
     public SecurityProvider getSecurityProvider() {
         return securityProvider;
     }
@@ -448,7 +447,7 @@ public class SessionContext implements N
         });
     }
 
-    @Nonnull
+    @NotNull
     private <T> T getConfig(Class<T> clss) {
         return securityProvider.getConfiguration(clss);
     }