Return-Path: X-Original-To: apmail-jackrabbit-commits-archive@www.apache.org Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 029DE9FA3 for ; Tue, 25 Oct 2011 07:03:29 +0000 (UTC) Received: (qmail 48332 invoked by uid 500); 25 Oct 2011 07:03:28 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 48286 invoked by uid 500); 25 Oct 2011 07:03:27 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 48277 invoked by uid 99); 25 Oct 2011 07:03:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 07:03:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 07:03:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7418A23888E4; Tue, 25 Oct 2011 07:03:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@jackrabbit.apache.org From: ckoell@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111025070305.7418A23888E4@eris.apache.org> 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; - /** * CredentialsWrapper... */ 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()); } }