Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 35786 invoked from network); 25 Oct 2005 07:51:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Oct 2005 07:51:58 -0000 Received: (qmail 9640 invoked by uid 500); 25 Oct 2005 07:51:57 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 9582 invoked by uid 500); 25 Oct 2005 07:51:57 -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 9571 invoked by uid 99); 25 Oct 2005 07:51:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2005 00:51:57 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 25 Oct 2005 00:51:55 -0700 Received: (qmail 35584 invoked by uid 65534); 25 Oct 2005 07:51:35 -0000 Message-ID: <20051025075135.35581.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r328306 - /directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java Date: Tue, 25 Oct 2005 07:51:34 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: elecharny Date: Tue Oct 25 00:51:30 2005 New Revision: 328306 URL: http://svn.apache.org/viewcvs?rev=328306&view=rev Log: Fixed the toString() method Modified: directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java Modified: directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java?rev=328306&r1=328305&r2=328306&view=diff ============================================================================== --- directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java (original) +++ directory/shared/ldap/branches/shared-ldap-utf8/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/BindRequest.java Tue Oct 25 00:51:30 2005 @@ -24,6 +24,7 @@ import org.apache.asn1new.ber.tlv.Value; import org.apache.asn1new.ldap.codec.LdapConstants; import org.apache.asn1new.ldap.codec.primitives.LdapDN; +import org.apache.asn1new.util.StringUtils; /** @@ -254,19 +255,27 @@ sb.append( " BindRequest\n" ); sb.append( " Version : '" ).append( version ).append( "'\n" ); - sb.append( " Name : '" ).append( name.toString() ).append( "'\n" ); - - if ( authentication instanceof SimpleAuthentication ) + + if ( StringUtils.isEmpty( name.toString() ) ) { - sb.append( " Simple authentication : '" ) - .append( ( ( SimpleAuthentication ) authentication ).toString() ).append( - "'\n" ); + sb.append( " Name : anonymous\n" ); } else { - sb.append( ( ( SaslCredentials ) authentication ).toString() ); + sb.append( " Name : '" ).append( name.toString() ).append( "'\n" ); + + if ( authentication instanceof SimpleAuthentication ) + { + sb.append( " Simple authentication : '" ) + .append( ( ( SimpleAuthentication ) authentication ).toString() ).append( + "'\n" ); + } + else + { + sb.append( ( ( SaslCredentials ) authentication ).toString() ); + } } - + return sb.toString(); } }