jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1521833 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: api/AuthInfo.java spi/security/authentication/AuthInfoImpl.java
Date Wed, 11 Sep 2013 13:43:42 GMT
Author: angela
Date: Wed Sep 11 13:43:42 2013
New Revision: 1521833

URL: http://svn.apache.org/r1521833
Log:
OAK-91 : autentication support 

- add missing annotation

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AuthInfo.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AuthInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AuthInfo.java?rev=1521833&r1=1521832&r2=1521833&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AuthInfo.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/AuthInfo.java
Wed Sep 11 13:43:42 2013
@@ -86,5 +86,6 @@ public interface AuthInfo {
      *
      * @return A set of principals.
      */
+    @Nonnull
     Set<Principal> getPrincipals();
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java?rev=1521833&r1=1521832&r2=1521833&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AuthInfoImpl.java
Wed Sep 11 13:43:42 2013
@@ -21,6 +21,7 @@ import java.util.Collections;
 import java.util.Map;
 import java.util.Set;
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import org.apache.jackrabbit.oak.api.AuthInfo;
 
@@ -33,10 +34,11 @@ public final class AuthInfoImpl implemen
     private final Map<String,?> attributes;
     private final Set<Principal> principals;
 
-    public AuthInfoImpl(String userID, Map<String, ?> attributes, Set<? extends
Principal> principals) {
+    public AuthInfoImpl(@Nullable String userID, @Nullable Map<String, ?> attributes,
+                        @Nullable Set<? extends Principal> principals) {
         this.userID = userID;
         this.attributes = (attributes == null) ? Collections.<String, Object>emptyMap()
: attributes;
-        this.principals = Collections.unmodifiableSet(principals);
+        this.principals = (principals == null) ? Collections.<Principal>emptySet()
: Collections.unmodifiableSet(principals);
     }
 
     //-----------------------------------------------------------< AuthInfo >---



Mime
View raw message