You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2018/11/07 14:29:25 UTC

svn commit: r1846033 [4/5] - in /jackrabbit/oak/branches/1.8: ./ oak-security-spi/ oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/ oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/ oak-security-spi/src/main/j...

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/AuthorizableType.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/AuthorizableType.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/AuthorizableType.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/AuthorizableType.java Wed Nov  7 14:29:24 2018
@@ -18,12 +18,11 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user;
 
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * The different authorizable types.
@@ -40,7 +39,7 @@ public enum AuthorizableType {
         this.userType = jcrUserType;
     }
 
-    @Nonnull
+    @NotNull
     public static AuthorizableType getType(int jcrUserType) {
         switch (jcrUserType) {
             case UserManager.SEARCH_TYPE_AUTHORIZABLE:

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserAuthenticationFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserAuthenticationFactory.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserAuthenticationFactory.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserAuthenticationFactory.java Wed Nov  7 14:29:24 2018
@@ -18,10 +18,8 @@ package org.apache.jackrabbit.oak.spi.se
 
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.spi.security.authentication.Authentication;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Provides a user management specific implementation of the
@@ -43,6 +41,6 @@ public interface UserAuthenticationFacto
      * {@code userId} or {@code null} if this implementation cannot not handle the
      * specified parameters.
      */
-    @CheckForNull
-    Authentication getAuthentication(@Nonnull UserConfiguration configuration, @Nonnull Root root, @Nullable String userId);
+    @Nullable
+    Authentication getAuthentication(@NotNull UserConfiguration configuration, @NotNull Root root, @Nullable String userId);
 }

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserConfiguration.java Wed Nov  7 14:29:24 2018
@@ -16,14 +16,13 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.security.SecurityConfiguration;
 import org.apache.jackrabbit.oak.spi.security.principal.PrincipalProvider;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Configuration interface for user management.
@@ -39,7 +38,7 @@ public interface UserConfiguration exten
      * @param namePathMapper A name path mapper used for conversion of jcr/oak names/paths.
      * @return a new instance of {@code UserManager}
      */
-    @Nonnull
+    @NotNull
     UserManager getUserManager(Root root, NamePathMapper namePathMapper);
 
     /**
@@ -63,5 +62,5 @@ public interface UserConfiguration exten
      * @see org.apache.jackrabbit.oak.spi.security.principal.PrincipalConfiguration
      */
     @Nullable
-    PrincipalProvider getUserPrincipalProvider(@Nonnull Root root, @Nonnull NamePathMapper namePathMapper);
+    PrincipalProvider getUserPrincipalProvider(@NotNull Root root, @NotNull NamePathMapper namePathMapper);
 }

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserIdCredentials.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserIdCredentials.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserIdCredentials.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserIdCredentials.java Wed Nov  7 14:29:24 2018
@@ -16,9 +16,10 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user;
 
-import javax.annotation.Nonnull;
 import javax.jcr.Credentials;
 
+import org.jetbrains.annotations.NotNull;
+
 /**
  * Credentials implementation that only contains a {@code userId} but no password.
  * It can be used for {@link org.apache.jackrabbit.api.security.user.User#getCredentials()},
@@ -28,13 +29,13 @@ public final class UserIdCredentials imp
 
     private final String userId;
 
-    public UserIdCredentials(@Nonnull String userId) {
+    public UserIdCredentials(@NotNull String userId) {
         this.userId = userId;
     }
 
-    @Nonnull
+    @NotNull
     public String getUserId() {
         return userId;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractAuthorizableAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractAuthorizableAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractAuthorizableAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractAuthorizableAction.java Wed Nov  7 14:29:24 2018
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user.action;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.RepositoryException;
 
 import org.apache.jackrabbit.api.security.user.Authorizable;
@@ -27,6 +25,8 @@ import org.apache.jackrabbit.oak.api.Roo
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Abstract implementation of the {@code AuthorizableAction} interface that
@@ -48,7 +48,7 @@ public abstract class AbstractAuthorizab
      * Doesn't perform any action.
      */
     @Override
-    public void onCreate(@Nonnull Group group, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onCreate(@NotNull Group group, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -56,7 +56,7 @@ public abstract class AbstractAuthorizab
      * Doesn't perform any action.
      */
     @Override
-    public void onCreate(@Nonnull User user, @Nullable String password, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -64,7 +64,7 @@ public abstract class AbstractAuthorizab
      * Doesn't perform any action.
      */
     @Override
-    public void onRemove(@Nonnull Authorizable authorizable, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onRemove(@NotNull Authorizable authorizable, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -72,7 +72,7 @@ public abstract class AbstractAuthorizab
      * Doesn't perform any action.
      */
     @Override
-    public void onPasswordChange(@Nonnull User user, @Nullable String newPassword, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 }

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractGroupAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractGroupAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractGroupAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AbstractGroupAction.java Wed Nov  7 14:29:24 2018
@@ -20,8 +20,8 @@ import org.apache.jackrabbit.api.securit
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
+import org.jetbrains.annotations.NotNull;
 
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 
 /**
@@ -37,7 +37,7 @@ public abstract class AbstractGroupActio
      * Doesn't perform any action.
      */
     @Override
-    public void onMemberAdded(@Nonnull Group group, @Nonnull Authorizable member, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onMemberAdded(@NotNull Group group, @NotNull Authorizable member, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -45,7 +45,7 @@ public abstract class AbstractGroupActio
      * Doesn't perform any action.
      */
     @Override
-    public void onMembersAdded(@Nonnull Group group, @Nonnull Iterable<String> memberIds, @Nonnull Iterable<String> failedIds, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onMembersAdded(@NotNull Group group, @NotNull Iterable<String> memberIds, @NotNull Iterable<String> failedIds, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -61,7 +61,7 @@ public abstract class AbstractGroupActio
      * Doesn't perform any action.
      */
     @Override
-    public void onMemberRemoved(@Nonnull Group group, @Nonnull Authorizable member, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onMemberRemoved(@NotNull Group group, @NotNull Authorizable member, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 
@@ -69,7 +69,7 @@ public abstract class AbstractGroupActio
      * Doesn't perform any action.
      */
     @Override
-    public void onMembersRemoved(@Nonnull Group group, @Nonnull Iterable<String> memberIds, @Nonnull Iterable<String> failedIds, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onMembersRemoved(@NotNull Group group, @NotNull Iterable<String> memberIds, @NotNull Iterable<String> failedIds, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         // nothing to do
     }
 }

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AccessControlAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AccessControlAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AccessControlAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AccessControlAction.java Wed Nov  7 14:29:24 2018
@@ -19,8 +19,6 @@ package org.apache.jackrabbit.oak.spi.se
 import java.security.Principal;
 import java.util.Collections;
 import java.util.Set;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.RepositoryException;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.AccessControlPolicy;
@@ -39,6 +37,8 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionConstants;
 import org.apache.jackrabbit.oak.spi.security.user.UserConfiguration;
 import org.apache.jackrabbit.oak.spi.security.user.util.UserUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -118,12 +118,12 @@ public class AccessControlAction extends
     }
 
     @Override
-    public void onCreate(@Nonnull Group group, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onCreate(@NotNull Group group, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         setAC(group, root, namePathMapper);
     }
 
     @Override
-    public void onCreate(@Nonnull User user, @Nullable String password, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         setAC(user, root, namePathMapper);
     }
 
@@ -144,8 +144,8 @@ public class AccessControlAction extends
         }
     }
 
-    private void setAC(@Nonnull Authorizable authorizable, @Nonnull Root root,
-                       @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    private void setAC(@NotNull Authorizable authorizable, @NotNull Root root,
+                       @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         if (securityProvider == null) {
             throw new IllegalStateException("Not initialized");
         }
@@ -196,7 +196,7 @@ public class AccessControlAction extends
         }
     }
 
-    private boolean isBuiltInUser(@Nonnull Authorizable authorizable) throws RepositoryException {
+    private boolean isBuiltInUser(@NotNull Authorizable authorizable) throws RepositoryException {
         ConfigurationParameters userConfig = securityProvider.getConfiguration(UserConfiguration.class).getParameters();
         String userId = authorizable.getID();
         return UserUtil.getAdminId(userConfig).equals(userId) || UserUtil.getAnonymousId(userConfig).equals(userId);
@@ -212,7 +212,7 @@ public class AccessControlAction extends
      * resolved to a valid privilege.
      */
     private static Privilege[] getPrivileges(@Nullable String[] privNames,
-                                             @Nonnull AccessControlManager acMgr) throws RepositoryException {
+                                             @NotNull AccessControlManager acMgr) throws RepositoryException {
         if (privNames == null || privNames.length == 0) {
             return new Privilege[0];
         }

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableActionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableActionProvider.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableActionProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableActionProvider.java Wed Nov  7 14:29:24 2018
@@ -17,9 +17,8 @@
 package org.apache.jackrabbit.oak.spi.security.user.action;
 
 import java.util.List;
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * {@code AuthorizableActionProvider} is used to provide {@code AuthorizableAction}s
@@ -29,6 +28,6 @@ import org.apache.jackrabbit.oak.spi.sec
  */
 public interface AuthorizableActionProvider {
 
-    @Nonnull
-    List<? extends AuthorizableAction> getAuthorizableActions(@Nonnull SecurityProvider securityProvider);
-}
\ No newline at end of file
+    @NotNull
+    List<? extends AuthorizableAction> getAuthorizableActions(@NotNull SecurityProvider securityProvider);
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/ClearMembershipAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/ClearMembershipAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/ClearMembershipAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/ClearMembershipAction.java Wed Nov  7 14:29:24 2018
@@ -17,13 +17,13 @@
 package org.apache.jackrabbit.oak.spi.security.user.action;
 
 import java.util.Iterator;
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Authorizable action attempting to clear all group membership before removing
@@ -35,7 +35,7 @@ public class ClearMembershipAction exten
 
     //-------------------------------------------------< AuthorizableAction >---
     @Override
-    public void onRemove(@Nonnull Authorizable authorizable, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onRemove(@NotNull Authorizable authorizable, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         clearMembership(authorizable);
     }
 

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/CompositeActionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/CompositeActionProvider.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/CompositeActionProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/CompositeActionProvider.java Wed Nov  7 14:29:24 2018
@@ -20,10 +20,9 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 
-import javax.annotation.Nonnull;
-
 import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Aggregates a collection of {@link AuthorizableActionProvider}s into a single
@@ -41,13 +40,13 @@ public class CompositeActionProvider imp
         this.providers = Arrays.asList(providers);
     }
 
-    @Nonnull
+    @NotNull
     @Override
-    public List<? extends AuthorizableAction> getAuthorizableActions(@Nonnull SecurityProvider securityProvider) {
+    public List<? extends AuthorizableAction> getAuthorizableActions(@NotNull SecurityProvider securityProvider) {
         List<AuthorizableAction> actions = Lists.newArrayList();
         for (AuthorizableActionProvider p : providers) {
             actions.addAll(p.getAuthorizableActions(securityProvider));
         }
         return actions;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/DefaultAuthorizableActionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/DefaultAuthorizableActionProvider.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/DefaultAuthorizableActionProvider.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/DefaultAuthorizableActionProvider.java Wed Nov  7 14:29:24 2018
@@ -20,12 +20,11 @@ import static org.apache.jackrabbit.oak.
 
 import java.util.List;
 import java.util.Map;
-import javax.annotation.Nonnull;
-
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.metatype.annotations.AttributeDefinition;
@@ -102,9 +101,9 @@ public class DefaultAuthorizableActionPr
     }
 
     //-----------------------------------------< AuthorizableActionProvider >---
-    @Nonnull
+    @NotNull
     @Override
-    public List<? extends AuthorizableAction> getAuthorizableActions(@Nonnull SecurityProvider securityProvider) {
+    public List<? extends AuthorizableAction> getAuthorizableActions(@NotNull SecurityProvider securityProvider) {
         List<AuthorizableAction> actions = Lists.newArrayListWithExpectedSize(enabledActions.length);
         for (String className : enabledActions) {
             try {
@@ -128,4 +127,4 @@ public class DefaultAuthorizableActionPr
         config = ConfigurationParameters.of(properties);
         enabledActions = config.getConfigValue(ENABLED_ACTIONS, DEFAULT_ACTIONS);
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordChangeAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordChangeAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordChangeAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordChangeAction.java Wed Nov  7 14:29:24 2018
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user.action;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 
@@ -27,6 +25,8 @@ import org.apache.jackrabbit.oak.namepat
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.oak.spi.security.user.util.PasswordUtil;
 import org.apache.jackrabbit.oak.plugins.tree.TreeUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * {@code PasswordChangeAction} asserts that the upon
@@ -43,7 +43,7 @@ public class PasswordChangeAction extend
 
     //-------------------------------------------------< AuthorizableAction >---
     @Override
-    public void onPasswordChange(@Nonnull User user, String newPassword, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onPasswordChange(@NotNull User user, String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         if (newPassword == null) {
             throw new ConstraintViolationException("Expected a new password that is not null.");
         }
@@ -54,8 +54,8 @@ public class PasswordChangeAction extend
     }
 
     //------------------------------------------------------------< private >---
-    @CheckForNull
-    private String getPasswordHash(@Nonnull Root root, @Nonnull User user) throws RepositoryException {
+    @Nullable
+    private String getPasswordHash(@NotNull Root root, @NotNull User user) throws RepositoryException {
         return TreeUtil.getString(root.getTree(user.getPath()), UserConstants.REP_PASSWORD);
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationAction.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationAction.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationAction.java Wed Nov  7 14:29:24 2018
@@ -18,8 +18,6 @@ package org.apache.jackrabbit.oak.spi.se
 
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 
@@ -29,6 +27,8 @@ import org.apache.jackrabbit.oak.namepat
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 import org.apache.jackrabbit.oak.spi.security.user.util.PasswordUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -67,12 +67,12 @@ public class PasswordValidationAction ex
     }
 
     @Override
-    public void onCreate(@Nonnull User user, @Nullable String password, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         validatePassword(password, false);
     }
 
     @Override
-    public void onPasswordChange(@Nonnull User user, @Nullable String newPassword, @Nonnull Root root, @Nonnull NamePathMapper namePathMapper) throws RepositoryException {
+    public void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
         validatePassword(newPassword, true);
     }
 
@@ -82,7 +82,7 @@ public class PasswordValidationAction ex
      *
      * @param constraint A regular expression that can be used to validate a new password.
      */
-    private void setConstraint(@Nonnull String constraint) {
+    private void setConstraint(@NotNull String constraint) {
         try {
             pattern = Pattern.compile(constraint);
         } catch (PatternSyntaxException e) {

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/package-info.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/package-info.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/package-info.java Wed Nov  7 14:29:24 2018
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@Version("1.1.1")
+@Version("1.1.2")
 package org.apache.jackrabbit.oak.spi.security.user.action;
 
 import org.osgi.annotation.versioning.Version;

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/package-info.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/package-info.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/package-info.java Wed Nov  7 14:29:24 2018
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@Version("2.3.0")
+@Version("2.3.1")
 package org.apache.jackrabbit.oak.spi.security.user;
 
 import org.osgi.annotation.versioning.Version;

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java Wed Nov  7 14:29:24 2018
@@ -23,15 +23,14 @@ import java.security.NoSuchAlgorithmExce
 import java.security.SecureRandom;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.KeySpec;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.crypto.SecretKeyFactory;
 import javax.crypto.spec.PBEKeySpec;
 
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.util.Text;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -71,7 +70,7 @@ public final class PasswordUtil {
      * @throws NoSuchAlgorithmException If {@link #DEFAULT_ALGORITHM} is not supported.
      * @throws UnsupportedEncodingException If utf-8 is not supported.
      */
-    public static String buildPasswordHash(@Nonnull String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {
+    public static String buildPasswordHash(@NotNull String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {
         return buildPasswordHash(password, DEFAULT_ALGORITHM, DEFAULT_SALT_SIZE, DEFAULT_ITERATIONS);
     }
 
@@ -90,7 +89,7 @@ public final class PasswordUtil {
      * @throws NoSuchAlgorithmException If the specified algorithm is not supported.
      * @throws UnsupportedEncodingException If utf-8 is not supported.
      */
-    public static String buildPasswordHash(@Nonnull String password,
+    public static String buildPasswordHash(@NotNull String password,
                                            @Nullable String algorithm,
                                            int saltSize, int iterations) throws NoSuchAlgorithmException, UnsupportedEncodingException {
         checkNotNull(password);
@@ -115,8 +114,8 @@ public final class PasswordUtil {
      * @throws NoSuchAlgorithmException If the specified algorithm is not supported.
      * @throws UnsupportedEncodingException If utf-8 is not supported.
      */
-    public static String buildPasswordHash(@Nonnull String password,
-                                           @Nonnull ConfigurationParameters config) throws NoSuchAlgorithmException, UnsupportedEncodingException {
+    public static String buildPasswordHash(@NotNull String password,
+                                           @NotNull ConfigurationParameters config) throws NoSuchAlgorithmException, UnsupportedEncodingException {
         checkNotNull(config);
         String algorithm = config.getConfigValue(UserConstants.PARAM_PASSWORD_HASH_ALGORITHM, DEFAULT_ALGORITHM);
         int iterations = config.getConfigValue(UserConstants.PARAM_PASSWORD_HASH_ITERATIONS, DEFAULT_ITERATIONS);
@@ -146,7 +145,7 @@ public final class PasswordUtil {
      * @return If the hash created from the specified {@code password} equals
      * the given {@code hashedPassword} string.
      */
-    public static boolean isSame(@Nullable String hashedPassword, @Nonnull char[] password) {
+    public static boolean isSame(@Nullable String hashedPassword, @NotNull char[] password) {
         return isSame(hashedPassword, String.valueOf(password));
     }
 
@@ -159,7 +158,7 @@ public final class PasswordUtil {
      * @return If the hash created from the specified {@code password} equals
      * the given {@code hashedPassword} string.
      */
-    public static boolean isSame(@Nullable String hashedPassword, @Nonnull String password) {
+    public static boolean isSame(@Nullable String hashedPassword, @NotNull String password) {
         if (hashedPassword == null) {
             return false;
         }
@@ -193,7 +192,7 @@ public final class PasswordUtil {
      * @param b
      * @return true if both parameters contain the same data.
      */
-    private static boolean compareSecure(@Nonnull String a, @Nonnull String b) {
+    private static boolean compareSecure(@NotNull String a, @NotNull String b) {
         int len = a.length();
         if (len != b.length()) {
             return false;
@@ -210,8 +209,8 @@ public final class PasswordUtil {
         return bits == 0;
     }
 
-    @Nonnull
-    private static String generateHash(@Nonnull String pwd, @Nonnull String algorithm,
+    @NotNull
+    private static String generateHash(@NotNull String pwd, @NotNull String algorithm,
                                        @Nullable String salt, int iterations) throws NoSuchAlgorithmException, UnsupportedEncodingException {
         StringBuilder passwordHash = new StringBuilder();
         passwordHash.append('{').append(algorithm).append('}');
@@ -237,7 +236,7 @@ public final class PasswordUtil {
         return passwordHash.toString();
     }
 
-    @Nonnull
+    @NotNull
     private static String generateSalt(int saltSize) {
         SecureRandom random = new SecureRandom();
         byte[] salt = new byte[saltSize];
@@ -252,7 +251,7 @@ public final class PasswordUtil {
      * @param bytes the byte array
      * @return the hex encoded string
      */
-    @Nonnull
+    @NotNull
     private static String convertBytesToHex(byte[] bytes) {
         StringBuilder res = new StringBuilder(bytes.length * 2);
         for (byte b : bytes) {
@@ -268,7 +267,7 @@ public final class PasswordUtil {
      * @param s the hex encoded string
      * @return the byte array
      */
-    @Nonnull
+    @NotNull
     private static byte[] convertHexToBytes(String s) {
         int len = s.length();
         if (len % 2 != 0) {
@@ -283,9 +282,9 @@ public final class PasswordUtil {
         return bytes;
     }
 
-    @Nonnull
-    private static String generatePBKDF2(@Nonnull String pwd, @Nonnull String salt,
-                                         @Nonnull String algorithm, int iterations, int keyLength) throws NoSuchAlgorithmException {
+    @NotNull
+    private static String generatePBKDF2(@NotNull String pwd, @NotNull String salt,
+                                         @NotNull String algorithm, int iterations, int keyLength) throws NoSuchAlgorithmException {
         // for example PBKDF2WithHmacSHA1
         SecretKeyFactory factory = SecretKeyFactory.getInstance(algorithm);
         byte[] saltBytes = convertHexToBytes(salt);
@@ -299,8 +298,8 @@ public final class PasswordUtil {
         }  
     }
 
-    @Nonnull
-    private static String generateDigest(@Nonnull String data, @Nonnull String algorithm, int iterations) throws UnsupportedEncodingException, NoSuchAlgorithmException {
+    @NotNull
+    private static String generateDigest(@NotNull String data, @NotNull String algorithm, int iterations) throws UnsupportedEncodingException, NoSuchAlgorithmException {
         byte[] bytes = data.getBytes(ENCODING);
         MessageDigest md = MessageDigest.getInstance(algorithm);
 
@@ -323,7 +322,7 @@ public final class PasswordUtil {
      * leading {@code algorithm} such as created by {@code buildPasswordHash}
      * or if the extracted string isn't a supported algorithm.
      */
-    @CheckForNull
+    @Nullable
     private static String extractAlgorithm(@Nullable String hashedPwd) {
         if (hashedPwd != null && !hashedPwd.isEmpty()) {
             int end = hashedPwd.indexOf('}');
@@ -342,7 +341,7 @@ public final class PasswordUtil {
         return null;
     }
 
-    @CheckForNull
+    @Nullable
     private static String extractSalt(@Nullable String hashedPwd, int start) {
         if (hashedPwd != null) {
             int end = hashedPwd.indexOf(DELIMITER, start);
@@ -370,4 +369,4 @@ public final class PasswordUtil {
         // no extra iterations
         return NO_ITERATIONS;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java Wed Nov  7 14:29:24 2018
@@ -16,10 +16,6 @@
  */
 package org.apache.jackrabbit.oak.spi.security.user.util;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.AuthorizableTypeException;
 import org.apache.jackrabbit.oak.api.PropertyState;
@@ -31,6 +27,8 @@ import org.apache.jackrabbit.oak.spi.xml
 import org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter;
 import org.apache.jackrabbit.oak.plugins.tree.TreeUtil;
 import org.apache.jackrabbit.util.Text;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -44,21 +42,21 @@ public final class UserUtil implements U
     private UserUtil() {
     }
 
-    public static boolean isAdmin(@Nonnull ConfigurationParameters parameters, @Nonnull String userId) {
+    public static boolean isAdmin(@NotNull ConfigurationParameters parameters, @NotNull String userId) {
         return getAdminId(parameters).equals(userId);
     }
 
-    @Nonnull
-    public static String getAdminId(@Nonnull ConfigurationParameters parameters) {
+    @NotNull
+    public static String getAdminId(@NotNull ConfigurationParameters parameters) {
         return parameters.getConfigValue(PARAM_ADMIN_ID, DEFAULT_ADMIN_ID);
     }
 
-    @Nonnull
-    public static String getAnonymousId(@Nonnull ConfigurationParameters parameters) {
+    @NotNull
+    public static String getAnonymousId(@NotNull ConfigurationParameters parameters) {
         return parameters.getConfigValue(PARAM_ANONYMOUS_ID, DEFAULT_ANONYMOUS_ID);
     }
 
-    public static boolean isType(@Nullable Tree authorizableTree, @Nonnull AuthorizableType type) {
+    public static boolean isType(@Nullable Tree authorizableTree, @NotNull AuthorizableType type) {
         if (authorizableTree != null) {
             String ntName = TreeUtil.getPrimaryTypeName(authorizableTree);
             switch (type) {
@@ -73,14 +71,14 @@ public final class UserUtil implements U
         return false;
     }
 
-    @CheckForNull
-    public static AuthorizableType getType(@Nonnull Tree authorizableNode) {
+    @Nullable
+    public static AuthorizableType getType(@NotNull Tree authorizableNode) {
         String ntName = TreeUtil.getPrimaryTypeName(authorizableNode);
         return getType(ntName);
     }
 
-    @CheckForNull
-    public static AuthorizableType getType(@CheckForNull String primaryTypeName) {
+    @Nullable
+    public static AuthorizableType getType(@Nullable String primaryTypeName) {
         if (primaryTypeName != null) {
             if (NT_REP_GROUP.equals(primaryTypeName)) {
                 return AuthorizableType.GROUP;
@@ -97,8 +95,8 @@ public final class UserUtil implements U
         return authorizableTree != null && NT_REP_SYSTEM_USER.equals(TreeUtil.getPrimaryTypeName(authorizableTree));
     }
 
-    @CheckForNull
-    public static String getAuthorizableRootPath(@Nonnull ConfigurationParameters parameters,
+    @Nullable
+    public static String getAuthorizableRootPath(@NotNull ConfigurationParameters parameters,
                                                  @Nullable AuthorizableType type) {
         String path = null;
         if (type != null) {
@@ -120,8 +118,8 @@ public final class UserUtil implements U
         return path;
     }
 
-    @CheckForNull
-    public static String getAuthorizableId(@Nonnull Tree authorizableTree) {
+    @Nullable
+    public static String getAuthorizableId(@NotNull Tree authorizableTree) {
         checkNotNull(authorizableTree);
         if (UserUtil.isType(authorizableTree, AuthorizableType.AUTHORIZABLE)) {
             PropertyState idProp = authorizableTree.getProperty(UserConstants.REP_AUTHORIZABLE_ID);
@@ -142,8 +140,8 @@ public final class UserUtil implements U
      * @param type The type of the authorizable tree.
      * @return The id retrieved from the specified {@code AuthorizableTree}.
      */
-    @Nonnull
-    public static String getAuthorizableId(@Nonnull Tree authorizableTree, @Nonnull AuthorizableType type) {
+    @NotNull
+    public static String getAuthorizableId(@NotNull Tree authorizableTree, @NotNull AuthorizableType type) {
         checkArgument(UserUtil.isType(authorizableTree, type));
         PropertyState idProp = authorizableTree.getProperty(UserConstants.REP_AUTHORIZABLE_ID);
         if (idProp != null) {
@@ -153,7 +151,7 @@ public final class UserUtil implements U
         }
     }
 
-    @CheckForNull
+    @Nullable
     public static <T extends Authorizable> T castAuthorizable(@Nullable Authorizable authorizable, Class<T> authorizableClass) throws AuthorizableTypeException {
         if (authorizable == null) {
             return null;
@@ -178,8 +176,8 @@ public final class UserUtil implements U
      * or {@link org.apache.jackrabbit.oak.spi.xml.ImportBehavior#IGNORE} if this
      * config parameter is missing.
      */
-    public static int getImportBehavior(@Nonnull ConfigurationParameters config) {
+    public static int getImportBehavior(@NotNull ConfigurationParameters config) {
         String importBehaviorStr = config.getConfigValue(ProtectedItemImporter.PARAM_IMPORT_BEHAVIOR, ImportBehavior.NAME_IGNORE);
         return ImportBehavior.valueFromString(importBehaviorStr);
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/package-info.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/package-info.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/package-info.java Wed Nov  7 14:29:24 2018
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@Version("1.2.0")
+@Version("1.2.1")
 package org.apache.jackrabbit.oak.spi.security.user.util;
 
 import org.osgi.annotation.versioning.Version;

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/NodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/NodeInfo.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/NodeInfo.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/NodeInfo.java Wed Nov  7 14:29:24 2018
@@ -17,7 +17,7 @@
 package org.apache.jackrabbit.oak.spi.xml;
 
 import java.util.Collections;
-import javax.annotation.Nonnull;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Information about a node being imported. This class is used
@@ -89,7 +89,7 @@ public class NodeInfo {
      *
      * @return mixin type names
      */
-    @Nonnull
+    @NotNull
     public Iterable<String> getMixinTypeNames() {
         return mixinTypeNames;
     }
@@ -103,4 +103,4 @@ public class NodeInfo {
         return uuid;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/PropInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/PropInfo.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/PropInfo.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/PropInfo.java Wed Nov  7 14:29:24 2018
@@ -19,9 +19,6 @@ package org.apache.jackrabbit.oak.spi.xm
 import java.util.Collections;
 import java.util.List;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
@@ -31,6 +28,8 @@ import com.google.common.collect.Immutab
 import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Information about a property being imported. This class is used
@@ -72,7 +71,7 @@ public class PropInfo {
      * @param type type of the property being imported
      * @param value value of the property being imported
      */
-    public PropInfo(@Nullable String name, int type, @Nonnull TextValue value) {
+    public PropInfo(@Nullable String name, int type, @NotNull TextValue value) {
         this(name, type, ImmutableList.of(value), MultipleStatus.UNKNOWN);
     }
 
@@ -83,7 +82,7 @@ public class PropInfo {
      * @param type type of the property being imported
      * @param values value(s) of the property being imported
      */
-    public PropInfo(@Nullable String name, int type, @Nonnull List<? extends TextValue> values) {
+    public PropInfo(@Nullable String name, int type, @NotNull List<? extends TextValue> values) {
         this(name, type, values, ((values.size() == 1) ? MultipleStatus.UNKNOWN : MultipleStatus.MULTIPLE));
     }
 
@@ -96,8 +95,8 @@ public class PropInfo {
      * @param multipleStatus Hint indicating whether the property is
      */
     public PropInfo(@Nullable String name, int type,
-                    @Nonnull List<? extends TextValue> values,
-                    @Nonnull MultipleStatus multipleStatus) {
+                    @NotNull List<? extends TextValue> values,
+                    @NotNull MultipleStatus multipleStatus) {
         this.name = name;
         this.type = type;
         this.values = ImmutableList.copyOf(values);
@@ -124,7 +123,7 @@ public class PropInfo {
         }
     }
 
-    @CheckForNull
+    @Nullable
     public String getName() {
         return name;
     }
@@ -137,7 +136,7 @@ public class PropInfo {
         return multipleStatus == MultipleStatus.UNKNOWN;
     }
 
-    @Nonnull
+    @NotNull
     public TextValue getTextValue() throws RepositoryException {
         if (multipleStatus == MultipleStatus.MULTIPLE) {
             throw new RepositoryException("Multiple import values with single-valued property definition");
@@ -145,12 +144,12 @@ public class PropInfo {
         return values.get(0);
     }
 
-    @Nonnull
+    @NotNull
     public List<? extends TextValue> getTextValues() {
         return values;
     }
 
-    @Nonnull
+    @NotNull
     public Value getValue(int targetType) throws RepositoryException {
         if (multipleStatus == MultipleStatus.MULTIPLE) {
             throw new RepositoryException("Multiple import values with single-valued property definition");
@@ -158,7 +157,7 @@ public class PropInfo {
         return values.get(0).getValue(targetType);
     }
 
-    @Nonnull
+    @NotNull
     public List<Value> getValues(int targetType) throws RepositoryException {
         if (values.isEmpty()) {
             return Collections.emptyList();
@@ -171,7 +170,7 @@ public class PropInfo {
         }
     }
 
-    public PropertyState asPropertyState(@Nonnull PropertyDefinition propertyDefinition) throws RepositoryException {
+    public PropertyState asPropertyState(@NotNull PropertyDefinition propertyDefinition) throws RepositoryException {
         List<Value> vs = getValues(getTargetType(propertyDefinition));
         PropertyState propertyState;
         if (vs.size() == 1 && !propertyDefinition.isMultiple()) {

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedItemImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedItemImporter.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedItemImporter.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedItemImporter.java Wed Nov  7 14:29:24 2018
@@ -16,13 +16,13 @@
  */
 package org.apache.jackrabbit.oak.spi.xml;
 
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Base interface for {@link ProtectedNodeImporter} and {@link ProtectedPropertyImporter}.
@@ -53,11 +53,11 @@ public interface ProtectedItemImporter {
      * @return {@code true} if this importer was successfully initialized and
      * is able to handle an import with the given setup; {@code false} otherwise.
      */
-    boolean init(@Nonnull Session session, @Nonnull Root root,
-            @Nonnull NamePathMapper namePathMapper,
+    boolean init(@NotNull Session session, @NotNull Root root,
+            @NotNull NamePathMapper namePathMapper,
             boolean isWorkspaceImport, int uuidBehavior,
-            @Nonnull ReferenceChangeTracker referenceTracker,
-            @Nonnull SecurityProvider securityProvider);
+            @NotNull ReferenceChangeTracker referenceTracker,
+            @NotNull SecurityProvider securityProvider);
 
     /**
      * Post processing protected reference properties underneath a protected
@@ -67,4 +67,4 @@ public interface ProtectedItemImporter {
      * @throws javax.jcr.RepositoryException If an error occurs.
      */
     void processReferences() throws RepositoryException;
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedNodeImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedNodeImporter.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedNodeImporter.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedNodeImporter.java Wed Nov  7 14:29:24 2018
@@ -17,11 +17,11 @@
 package org.apache.jackrabbit.oak.spi.xml;
 
 import java.util.List;
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 
 import org.apache.jackrabbit.oak.api.Tree;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * {@code ProtectedNodeImporter} provides means to import protected
@@ -54,7 +54,7 @@ public interface ProtectedNodeImporter e
      * this importer without having reached {@link #end(Tree)}.
      * @throws javax.jcr.RepositoryException If an error occurs.
      */
-    boolean start(@Nonnull Tree protectedParent) throws IllegalStateException,
+    boolean start(@NotNull Tree protectedParent) throws IllegalStateException,
             RepositoryException;
 
     /**
@@ -71,7 +71,7 @@ public interface ProtectedNodeImporter e
      * that was imported is incomplete.
      * @throws RepositoryException If another error occurs.
      */
-    void end(@Nonnull Tree protectedParent) throws IllegalStateException,
+    void end(@NotNull Tree protectedParent) throws IllegalStateException,
             ConstraintViolationException, RepositoryException;
 
     /**
@@ -94,7 +94,7 @@ public interface ProtectedNodeImporter e
      * handled by this importer.
      * @throws RepositoryException If another error occurs.
      */
-    void startChildInfo(@Nonnull NodeInfo childInfo, @Nonnull List<PropInfo> propInfos)
+    void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos)
             throws IllegalStateException, ConstraintViolationException, RepositoryException;
 
     /**
@@ -109,4 +109,4 @@ public interface ProtectedNodeImporter e
      * @throws RepositoryException If another error occurs.
      */
     void endChildInfo() throws RepositoryException;
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedPropertyImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedPropertyImporter.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedPropertyImporter.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/ProtectedPropertyImporter.java Wed Nov  7 14:29:24 2018
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.oak.spi.xml;
 
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.PropertyDefinition;
 
 import org.apache.jackrabbit.oak.api.Tree;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * {@code ProtectedPropertyImporter} is in charge of importing single
@@ -43,8 +43,8 @@ public interface ProtectedPropertyImport
      * {@code false} otherwise.
      * @throws javax.jcr.RepositoryException If an error occurs.
      */
-    boolean handlePropInfo(@Nonnull Tree parent, @Nonnull PropInfo protectedPropInfo,
-                           @Nonnull PropertyDefinition def) throws RepositoryException;
+    boolean handlePropInfo(@NotNull Tree parent, @NotNull PropInfo protectedPropInfo,
+                           @NotNull PropertyDefinition def) throws RepositoryException;
 
     /**
      * Informs this importer that all properties to be imported below
@@ -59,7 +59,7 @@ public interface ProtectedPropertyImport
      * properties was incomplete and the importer was not able to fix the problem.
      * @throws RepositoryException If another error occurs.
      */
-    void propertiesCompleted(@Nonnull Tree protectedParent) throws IllegalStateException,
+    void propertiesCompleted(@NotNull Tree protectedParent) throws IllegalStateException,
             ConstraintViolationException, RepositoryException;
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/package-info.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/package-info.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/xml/package-info.java Wed Nov  7 14:29:24 2018
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@Version("1.0.0")
+@Version("1.0.1")
 package org.apache.jackrabbit.oak.spi.xml;
 
-import org.osgi.annotation.versioning.Version;
\ No newline at end of file
+import org.osgi.annotation.versioning.Version;

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/plugins/tree/TreeTypeProviderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/plugins/tree/TreeTypeProviderTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/plugins/tree/TreeTypeProviderTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/plugins/tree/TreeTypeProviderTest.java Wed Nov  7 14:29:24 2018
@@ -18,14 +18,13 @@ package org.apache.jackrabbit.oak.plugin
 
 import java.util.ArrayList;
 import java.util.List;
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.spi.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.spi.version.VersionConstants;
+import org.jetbrains.annotations.NotNull;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -45,27 +44,27 @@ public class TreeTypeProviderTest extend
         typeProvider = new TreeTypeProvider(new TreeContext(){
 
             @Override
-            public boolean definesProperty(@Nonnull Tree parent, @Nonnull PropertyState property) {
+            public boolean definesProperty(@NotNull Tree parent, @NotNull PropertyState property) {
                 return false;
             }
 
             @Override
-            public boolean definesContextRoot(@Nonnull Tree tree) {
+            public boolean definesContextRoot(@NotNull Tree tree) {
                 return tree.getName().equals("ctxRoot");
             }
 
             @Override
-            public boolean definesTree(@Nonnull Tree tree) {
+            public boolean definesTree(@NotNull Tree tree) {
                 return false;
             }
 
             @Override
-            public boolean definesLocation(@Nonnull TreeLocation location) {
+            public boolean definesLocation(@NotNull TreeLocation location) {
                 return false;
             }
 
             @Override
-            public boolean definesInternal(@Nonnull Tree tree) {
+            public boolean definesInternal(@NotNull Tree tree) {
                 return tree.getName().equals("internal");
             }
         });
@@ -170,14 +169,14 @@ public class TreeTypeProviderTest extend
         private final TreeType type;
         private final TreeType parentType;
 
-        private TypeTest(@Nonnull String path, TreeType type) {
+        private TypeTest(@NotNull String path, TreeType type) {
             this(path, type, TreeType.DEFAULT);
         }
         
-        private TypeTest(@Nonnull String path, TreeType type, TreeType parentType) {
+        private TypeTest(@NotNull String path, TreeType type, TreeType parentType) {
             this.path = path;
             this.type = type;
             this.parentType = parentType;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeConfigurationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeConfigurationTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeConfigurationTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeConfigurationTest.java Wed Nov  7 14:29:24 2018
@@ -19,9 +19,6 @@ package org.apache.jackrabbit.oak.spi.se
 import java.security.Principal;
 import java.util.List;
 import java.util.Set;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import org.apache.jackrabbit.oak.plugins.tree.RootProvider;
@@ -35,6 +32,8 @@ import org.apache.jackrabbit.oak.spi.lif
 import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer;
 import org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer;
 import org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -54,21 +53,21 @@ public class CompositeConfigurationTest
     @Before
     public void before() throws Exception {
         compositeConfiguration = new CompositeConfiguration("test", new SecurityProvider() {
-            @Nonnull
+            @NotNull
             @Override
             public ConfigurationParameters getParameters(@Nullable String name) {
                 throw new UnsupportedOperationException();
             }
 
-            @Nonnull
+            @NotNull
             @Override
             public Iterable<? extends SecurityConfiguration> getConfigurations() {
                 throw new UnsupportedOperationException();
             }
 
-            @Nonnull
+            @NotNull
             @Override
-            public <T> T getConfiguration(@Nonnull Class<T> configClass) {
+            public <T> T getConfiguration(@NotNull Class<T> configClass) {
                 throw new UnsupportedOperationException();
             }
         }) {};
@@ -132,7 +131,7 @@ public class CompositeConfigurationTest
         compositeConfiguration.addConfiguration(r200, ConfigurationParameters.of(Constants.SERVICE_RANKING, 200));
 
         SecurityConfiguration r150 = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public ConfigurationParameters getParameters() {
                 return ConfigurationParameters.of(CompositeConfiguration.PARAM_RANKING, 150);
@@ -141,7 +140,7 @@ public class CompositeConfigurationTest
         compositeConfiguration.addConfiguration(r150, ConfigurationParameters.EMPTY);
 
         SecurityConfiguration r50 = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public ConfigurationParameters getParameters() {
                 return ConfigurationParameters.of(CompositeConfiguration.PARAM_RANKING, 50);
@@ -245,7 +244,7 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getProtectedItemImporters().isEmpty());
 
         SecurityConfiguration withImporter = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public List<ProtectedItemImporter> getProtectedItemImporters() {
                 return ImmutableList.of(Mockito.mock(ProtectedItemImporter.class));
@@ -264,7 +263,7 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getConflictHandlers().isEmpty());
 
         SecurityConfiguration withConflictHandler = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public List<ThreeWayConflictHandler> getConflictHandlers() {
                 return ImmutableList.of(Mockito.mock(ThreeWayConflictHandler.class));
@@ -283,9 +282,9 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getCommitHooks(null).isEmpty());
 
         SecurityConfiguration withCommitHook = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
-            public List<? extends CommitHook> getCommitHooks(@Nonnull String workspaceName) {
+            public List<? extends CommitHook> getCommitHooks(@NotNull String workspaceName) {
                 return ImmutableList.of(Mockito.mock(CommitHook.class));
             }
         };
@@ -302,9 +301,9 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getValidators(null, ImmutableSet.of(), new MoveTracker()).isEmpty());
 
         SecurityConfiguration withValidator = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
-            public List<? extends ValidatorProvider> getValidators(@Nonnull String workspaceName, @Nonnull Set<Principal> principals, @Nonnull MoveTracker moveTracker) {
+            public List<? extends ValidatorProvider> getValidators(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker) {
                 return ImmutableList.of(Mockito.mock(ValidatorProvider.class));
             }
         };
@@ -321,7 +320,7 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getWorkspaceInitializer() instanceof CompositeWorkspaceInitializer);
 
         SecurityConfiguration withWorkspaceInitializer = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public WorkspaceInitializer getWorkspaceInitializer() {
                 return Mockito.mock(WorkspaceInitializer.class);
@@ -340,7 +339,7 @@ public class CompositeConfigurationTest
         assertTrue(compositeConfiguration.getRepositoryInitializer() instanceof CompositeInitializer);
 
         SecurityConfiguration withRepositoryInitializer = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public RepositoryInitializer getRepositoryInitializer() {
                 return Mockito.mock(RepositoryInitializer.class);
@@ -360,7 +359,7 @@ public class CompositeConfigurationTest
 
         ConfigurationParameters params = ConfigurationParameters.of("a", "valueA", "b", "valueB");
         SecurityConfiguration withParams = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public ConfigurationParameters getParameters() {
                 return params;
@@ -372,7 +371,7 @@ public class CompositeConfigurationTest
 
         ConfigurationParameters params2 = ConfigurationParameters.of("a", "valueA2", "c", "valueC");
         SecurityConfiguration withParams2 = new SecurityConfiguration.Default() {
-            @Nonnull
+            @NotNull
             @Override
             public ConfigurationParameters getParameters() {
                 return params2;
@@ -385,4 +384,4 @@ public class CompositeConfigurationTest
         assertEquals(ImmutableSet.copyOf(ConfigurationParameters.of(params, params2).keySet()), ImmutableSet.copyOf(compositeParams.keySet()));
         assertEquals("valueA2", compositeParams.getConfigValue("a", "def"));
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeContextTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeContextTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeContextTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/CompositeContextTest.java Wed Nov  7 14:29:24 2018
@@ -18,11 +18,10 @@ package org.apache.jackrabbit.oak.spi.se
 
 import java.lang.reflect.Field;
 
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.plugins.tree.TreeLocation;
+import org.jetbrains.annotations.NotNull;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -208,7 +207,7 @@ public class CompositeContextTest extend
             this.ctx = new TestContext(returnValue);
         }
 
-        @Nonnull
+        @NotNull
         @Override
         public Context getContext() {
             return ctx;
@@ -226,33 +225,33 @@ public class CompositeContextTest extend
         }
 
         @Override
-        public boolean definesProperty(@Nonnull Tree parent, @Nonnull PropertyState property) {
+        public boolean definesProperty(@NotNull Tree parent, @NotNull PropertyState property) {
             method = "definesProperty";
             return returnValue;
         }
 
         @Override
-        public boolean definesContextRoot(@Nonnull Tree tree) {
+        public boolean definesContextRoot(@NotNull Tree tree) {
             method = "definesContextRoot";
             return returnValue;
         }
 
         @Override
-        public boolean definesTree(@Nonnull Tree tree) {
+        public boolean definesTree(@NotNull Tree tree) {
             method = "definesTree";
             return returnValue;
         }
 
         @Override
-        public boolean definesLocation(@Nonnull TreeLocation location) {
+        public boolean definesLocation(@NotNull TreeLocation location) {
             method = "definesLocation";
             return returnValue;
         }
 
         @Override
-        public boolean definesInternal(@Nonnull Tree tree) {
+        public boolean definesInternal(@NotNull Tree tree) {
             method = "definesInternal";
             return returnValue;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModuleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModuleTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModuleTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModuleTest.java Wed Nov  7 14:29:24 2018
@@ -22,8 +22,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.Credentials;
 import javax.jcr.SimpleCredentials;
 import javax.security.auth.Subject;
@@ -54,6 +52,8 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.principal.TestPrincipalProvider;
 import org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard;
 import org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
 import org.mockito.Mockito;
 
@@ -509,7 +509,7 @@ public class AbstractLoginModuleTest {
             this.supportedCredentialsClass = supportedCredentialsClass;
         }
 
-        @Nonnull
+        @NotNull
         @Override
         protected Set<Class> getSupportedCredentials() {
             return Collections.singleton(supportedCredentialsClass);
@@ -538,15 +538,15 @@ public class AbstractLoginModuleTest {
         private TestCallbackHandler() {
         }
 
-        private TestCallbackHandler(@Nonnull Whiteboard whiteboard) {
+        private TestCallbackHandler(@NotNull Whiteboard whiteboard) {
             this.whiteboard = whiteboard;
         }
 
-        private TestCallbackHandler(@Nonnull UserManager userManager) {
+        private TestCallbackHandler(@NotNull UserManager userManager) {
             this.userManager = userManager;
         }
 
-        private TestCallbackHandler(@Nonnull PrincipalProvider principalProvider) {
+        private TestCallbackHandler(@NotNull PrincipalProvider principalProvider) {
             this.principalProvider = principalProvider;
         }
 
@@ -582,7 +582,7 @@ public class AbstractLoginModuleTest {
 
     private final class TestContentRepository implements ContentRepository {
 
-        @Nonnull
+        @NotNull
         @Override
         public ContentSession login(@Nullable Credentials credentials, @Nullable String workspaceName) {
             ContentSession cs = Mockito.mock(ContentSession.class);
@@ -592,10 +592,10 @@ public class AbstractLoginModuleTest {
 
         }
 
-        @Nonnull
+        @NotNull
         @Override
         public Descriptors getDescriptors() {
             throw new UnsupportedOperationException();
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenConfigurationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenConfigurationTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenConfigurationTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenConfigurationTest.java Wed Nov  7 14:29:24 2018
@@ -17,12 +17,11 @@
 package org.apache.jackrabbit.oak.spi.security.authentication.token;
 
 import java.util.List;
-import javax.annotation.Nonnull;
-
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.spi.security.AbstractCompositeConfigurationTest;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationBase;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
+import org.jetbrains.annotations.NotNull;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -144,10 +143,10 @@ public class CompositeTokenConfiguration
 
     private static final class TestTokenConfig extends ConfigurationBase implements TokenConfiguration {
 
-        @Nonnull
+        @NotNull
         @Override
         public TokenProvider getTokenProvider(Root root) {
             return Mockito.mock(TokenProvider.class);
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenProviderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenProviderTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenProviderTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/token/CompositeTokenProviderTest.java Wed Nov  7 14:29:24 2018
@@ -17,14 +17,14 @@
 package org.apache.jackrabbit.oak.spi.security.authentication.token;
 
 import java.util.Map;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
 import javax.jcr.Credentials;
 import javax.jcr.GuestCredentials;
 import javax.jcr.SimpleCredentials;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -123,13 +123,13 @@ public class CompositeTokenProviderTest
 
     private final class TestTokenProvider implements TokenProvider {
         @Override
-        public boolean doCreateToken(@Nonnull Credentials credentials) {
+        public boolean doCreateToken(@NotNull Credentials credentials) {
             return credentials instanceof SimpleCredentials;
         }
 
-        @CheckForNull
+        @Nullable
         @Override
-        public TokenInfo createToken(@Nonnull Credentials credentials) {
+        public TokenInfo createToken(@NotNull Credentials credentials) {
             if (credentials instanceof SimpleCredentials) {
                 return info;
             } else {
@@ -137,16 +137,16 @@ public class CompositeTokenProviderTest
             }
         }
 
-        @CheckForNull
+        @Nullable
         @Override
-        public TokenInfo createToken(@Nonnull String userId, @Nonnull Map<String, ?> attributes) {
+        public TokenInfo createToken(@NotNull String userId, @NotNull Map<String, ?> attributes) {
             throw new UnsupportedOperationException();
 
         }
 
-        @CheckForNull
+        @Nullable
         @Override
-        public TokenInfo getTokenInfo(@Nonnull String token) {
+        public TokenInfo getTokenInfo(@NotNull String token) {
             if (TOKEN.equals(token)) {
                 return info;
             } else {
@@ -154,4 +154,4 @@ public class CompositeTokenProviderTest
             }
         }
     };
-}
\ No newline at end of file
+}

Modified: jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlListTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlListTest.java?rev=1846033&r1=1846032&r2=1846033&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlListTest.java (original)
+++ jackrabbit/oak/branches/1.8/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlListTest.java Wed Nov  7 14:29:24 2018
@@ -23,8 +23,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 
@@ -43,6 +41,8 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.principal.PrincipalImpl;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBits;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
 import org.mockito.Mockito;
 
@@ -72,15 +72,15 @@ public class AbstractAccessControlListTe
         rDefs.put("r2", new RestrictionDefinitionImpl("r2", Type.LONGS, false));
 
         return new AbstractRestrictionProvider(rDefs) {
-            @Nonnull
+            @NotNull
             @Override
-            public RestrictionPattern getPattern(@Nullable String oakPath, @Nonnull Tree tree) {
+            public RestrictionPattern getPattern(@Nullable String oakPath, @NotNull Tree tree) {
                 throw new UnsupportedOperationException();
             }
 
-            @Nonnull
+            @NotNull
             @Override
-            public RestrictionPattern getPattern(@Nullable String oakPath, @Nonnull Set<Restriction> restrictions) {
+            public RestrictionPattern getPattern(@Nullable String oakPath, @NotNull Set<Restriction> restrictions) {
                 throw new UnsupportedOperationException();
             }
         };
@@ -90,29 +90,29 @@ public class AbstractAccessControlListTe
         return createACL(getTestPath(), Collections.<JackrabbitAccessControlEntry>emptyList(), getNamePathMapper());
     }
 
-    protected AbstractAccessControlList createACL(@Nonnull JackrabbitAccessControlEntry... entries) {
+    protected AbstractAccessControlList createACL(@NotNull JackrabbitAccessControlEntry... entries) {
         return createACL(getTestPath(), Lists.newArrayList(entries), getNamePathMapper());
     }
 
-    protected AbstractAccessControlList createACL(@Nonnull List<JackrabbitAccessControlEntry> entries) {
+    protected AbstractAccessControlList createACL(@NotNull List<JackrabbitAccessControlEntry> entries) {
         return createACL(getTestPath(), entries, getNamePathMapper());
     }
 
     protected AbstractAccessControlList createACL(@Nullable String jcrPath,
-                                                  @Nonnull ACE... entries) {
+                                                  @NotNull ACE... entries) {
         return createACL(jcrPath, Lists.newArrayList(entries), getNamePathMapper());
     }
 
     protected AbstractAccessControlList createACL(@Nullable String jcrPath,
-                                                  @Nonnull List<JackrabbitAccessControlEntry> entries,
-                                                  @Nonnull NamePathMapper namePathMapper) {
+                                                  @NotNull List<JackrabbitAccessControlEntry> entries,
+                                                  @NotNull NamePathMapper namePathMapper) {
         return createACL(jcrPath, entries, namePathMapper, getRestrictionProvider());
     }
 
     protected AbstractAccessControlList createACL(@Nullable String jcrPath,
-                                                  @Nonnull List<JackrabbitAccessControlEntry> entries,
-                                                  @Nonnull NamePathMapper namePathMapper,
-                                                  @Nonnull RestrictionProvider restrictionProvider) {
+                                                  @NotNull List<JackrabbitAccessControlEntry> entries,
+                                                  @NotNull NamePathMapper namePathMapper,
+                                                  @NotNull RestrictionProvider restrictionProvider) {
         return new TestACL(jcrPath, restrictionProvider, namePathMapper, entries);
     }
 
@@ -269,4 +269,4 @@ public class AbstractAccessControlListTe
     public void testIsMultiValueRestrictionForUnknownName() throws RepositoryException {
         assertFalse(createEmptyACL().isMultiValueRestriction("unknownRestrictionName"));
     }
-}
\ No newline at end of file
+}