jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1575469 - /jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java
Date Sat, 08 Mar 2014 01:26:10 GMT
Author: tripod
Date: Sat Mar  8 01:26:10 2014
New Revision: 1575469

URL: http://svn.apache.org/r1575469
Log:
OAK-516 Create LdapLoginModule based on ExternalLoginModule (wip)

Modified:
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java

Modified: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java?rev=1575469&r1=1575468&r2=1575469&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java
(original)
+++ jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProperties.java
Sat Mar  8 01:26:10 2014
@@ -20,6 +20,9 @@ import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
 /**
  * {@code LdapIdentityProperties} implements a case insensitive hash map that preserves the
case of the keys but
  * ignores the case during lookup.
@@ -85,7 +88,11 @@ public class LdapIdentityProperties exte
         keyMapping.clear();
     }
 
-    private String convert(Object obj) {
+    @CheckForNull
+    private String convert(@Nullable Object obj) {
+        if (obj == null) {
+            return null;
+        }
         String key = obj instanceof String ? (String) obj : String.valueOf(obj);
         return key.toUpperCase(Locale.ENGLISH).toLowerCase(Locale.ENGLISH);
     }



Mime
View raw message