jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cko...@apache.org
Subject svn commit: r1188541 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java
Date Tue, 25 Oct 2011 07:03:05 GMT
Author: ckoell
Date: Tue Oct 25 07:03:05 2011
New Revision: 1188541

URL: http://svn.apache.org/viewvc?rev=1188541&view=rev
Log:
JCR-3126 The CredentialsWrapper should use a empty String as userId if custom Credentials
are used

Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java?rev=1188541&r1=1188540&r2=1188541&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/CredentialsWrapper.java
Tue Oct 25 07:03:05 2011
@@ -16,20 +16,16 @@
  */
 package org.apache.jackrabbit.spi2dav;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import javax.jcr.SimpleCredentials;
+
 import org.apache.commons.httpclient.Credentials;
 import org.apache.commons.httpclient.UsernamePasswordCredentials;
 
-import javax.jcr.SimpleCredentials;
-
 /**
  * <code>CredentialsWrapper</code>...
  */
 class CredentialsWrapper {
 
-    private static Logger log = LoggerFactory.getLogger(CredentialsWrapper.class);
-
     private final String userId;
     private final UsernamePasswordCredentials credentials;
 
@@ -37,14 +33,14 @@ class CredentialsWrapper {
 
         if (creds == null) {
             // NOTE: null credentials only work if 'missing-auth-mapping' param is set on
the server
-            userId = null;
+            userId = "";
             this.credentials = null;
         } else if (creds instanceof SimpleCredentials) {
             SimpleCredentials sCred = (SimpleCredentials) creds;
             userId = sCred.getUserID();
             this.credentials = new UsernamePasswordCredentials(userId, String.valueOf(sCred.getPassword()));
         } else {
-            userId = null;
+            userId = "";
             this.credentials = new UsernamePasswordCredentials(creds.toString());
         }
     }



Mime
View raw message