directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r585737 - /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
Date Wed, 17 Oct 2007 22:28:02 GMT
Author: elecharny
Date: Wed Oct 17 15:28:01 2007
New Revision: 585737

URL: http://svn.apache.org/viewvc?rev=585737&view=rev
Log:
Updated the toString() method to show SASL values

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=585737&r1=585736&r2=585737&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
Wed Oct 17 15:28:01 2007
@@ -388,7 +388,7 @@
         sb.append( "    BindRequest\n" );
         sb.append( "        Version : '" ).append( isVersion3 ? "3" : "2" ).append( "'\n"
);
 
-        if ( StringTools.isEmpty( name.toString() ) )
+        if ( StringTools.isEmpty( name.toString() ) && isSimple )
         {
             sb.append( "        Name : anonymous\n" );
         }
@@ -405,9 +405,19 @@
             {
                 sb.append( "        Sasl credentials\n" );
                 sb.append( "            Mechanism :'" ).append( mechanism ).append( "'\n"
);
-
-                sb.append( "            Credentials : '" ).append( StringTools.utf8ToString(
credentials ) ).append(
-                    '/' ).append( StringTools.dumpBytes( credentials ) ).append( "'\n" );
+                
+                if ( credentials == null )
+                {
+                    sb.append( "            Credentials : null" );
+                }
+                else
+                {
+                    sb.append( "            Credentials : '" ).
+                        append( StringTools.utf8ToString( credentials ) ).
+                        append( '/' ).
+                        append( StringTools.dumpBytes( credentials ) ).
+                        append( "'\n" );
+                }
             }
         }
 



Mime
View raw message