Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 34882 invoked from network); 22 Jul 2008 20:36:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 20:36:01 -0000 Received: (qmail 10402 invoked by uid 500); 22 Jul 2008 20:36:01 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 10333 invoked by uid 500); 22 Jul 2008 20:36:01 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 10324 invoked by uid 99); 22 Jul 2008 20:36:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 13:36:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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, 22 Jul 2008 20:35:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D2EDD238889B; Tue, 22 Jul 2008 13:35:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r678888 - in /directory/apacheds/branches/bigbang: core/src/main/java/org/apache/directory/server/core/authn/ server-unit/src/test/java/org/apache/directory/server/operations/bind/ Date: Tue, 22 Jul 2008 20:35:10 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080722203510.D2EDD238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Tue Jul 22 13:35:10 2008 New Revision: 678888 URL: http://svn.apache.org/viewvc?rev=678888&view=rev Log: o Correctly fixed the failing SimpleBind test by throwing the correct exception (the wrong one was throwed before) o Removed some useless import Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=678888&r1=678887&r2=678888&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Tue Jul 22 13:35:10 2008 @@ -28,8 +28,6 @@ import java.util.Map; import java.util.Set; -import javax.naming.OperationNotSupportedException; - import org.apache.directory.server.core.CoreSession; import org.apache.directory.server.core.DefaultCoreSession; import org.apache.directory.server.core.DirectoryService; @@ -56,6 +54,8 @@ import org.apache.directory.server.core.interceptor.context.SearchOperationContext; import org.apache.directory.shared.ldap.constants.AuthenticationLevel; import org.apache.directory.shared.ldap.exception.LdapAuthenticationException; +import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException; +import org.apache.directory.shared.ldap.message.ResultCodeEnum; import org.apache.directory.shared.ldap.name.LdapDN; import org.slf4j.Logger; @@ -425,7 +425,7 @@ { // This is a case where the Bind request contains a DN, but no password. // We don't check the DN, we just return a UnwillingToPerform error - throw new OperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName() ); + throw new LdapOperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName(), ResultCodeEnum.UNWILLING_TO_PERFORM ); } Collection authenticators = getAuthenticators( level.getName() ); Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java?rev=678888&r1=678887&r2=678888&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java Tue Jul 22 13:35:10 2008 @@ -21,7 +21,6 @@ import javax.naming.Context; -import javax.naming.NamingException; import org.apache.directory.server.core.DirectoryService; import org.apache.directory.server.core.interceptor.context.BindOperationContext; Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java?rev=678888&r1=678887&r2=678888&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java (original) +++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java Tue Jul 22 13:35:10 2008 @@ -378,7 +378,7 @@ catch ( OperationNotSupportedException onse ) { // Error code 53 : LDAP_UNWILLING_TO_PERFORM - assertTrue( true ); + assertTrue( onse.getMessage().startsWith( "[LDAP: error code 53 - Bind failed" ) ); } catch ( NamingException ne ) {