directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209234 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java
Date Tue, 05 Jul 2005 06:43:49 GMT
Author: elecharny
Date: Mon Jul  4 23:43:48 2005
New Revision: 209234

URL: http://svn.apache.org/viewcvs?rev=209234&view=rev
Log:
- migrated a part of the toString() method to the underlying SaslCredential class.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java?rev=209234&r1=209233&r2=209234&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequest.java
Mon Jul  4 23:43:48 2005
@@ -19,6 +19,7 @@
 import org.apache.asn1.Asn1Object;
 import org.apache.asn1.ldap.codec.primitives.LdapDN;
 
+
 /**
  * A BindRequest ldapObject. It's a sub-class of Asn1Object, and it extends
  * the Asn1Object class to be seen as a member of the LdapMessage
@@ -31,10 +32,10 @@
     //~ Instance fields ----------------------------------------------------------------------------
 
     /** The protocol Version to use. Should be 3 */
-    private int        version;
+    private int version;
 
     /** The name of the user requesting a bind */
-    private LdapDN     name;
+    private LdapDN name;
 
     /** The authentication used to bind the user */
     private Asn1Object authentication;
@@ -58,7 +59,6 @@
      */
     public Asn1Object getAuthentication()
     {
-
         return authentication;
     }
 
@@ -69,8 +69,7 @@
      */
     public SimpleAuthentication getSimpleAuthentication()
     {
-
-        return (SimpleAuthentication)authentication;
+        return ( SimpleAuthentication ) authentication;
     }
 
     /**
@@ -80,8 +79,7 @@
      */
     public SaslCredentials getSaslAuthentication()
     {
-
-        return (SaslCredentials)authentication;
+        return ( SaslCredentials ) authentication;
     }
 
     /**
@@ -101,7 +99,7 @@
      */
     public String getName()
     {
-        return (name == null ? null : name.toString());
+        return ( ( name == null ) ? null : name.toString() );
     }
 
     /**
@@ -121,10 +119,9 @@
      */
     public int getVersion()
     {
-
         return version;
     }
-    
+
     /**
      * Check if the Ldap version in use is 3
      * 
@@ -144,7 +141,7 @@
     {
         this.version = version;
     }
-    
+
     /**
      * Get a String representation of a BindRequest
      *
@@ -152,29 +149,23 @@
      */
     public String toString()
     {
-
         StringBuffer sb = new StringBuffer();
 
         sb.append( "    BindRequest\n" );
-        sb.append( "        Version : '" ).append( version ).append("'\n");
-        sb.append( "        Name : '" ).append( name.toString() ).append("'\n");
-        
+        sb.append( "        Version : '" ).append( version ).append( "'\n" );
+        sb.append( "        Name : '" ).append( name.toString() ).append( "'\n" );
+
         if ( authentication instanceof SimpleAuthentication )
         {
-            sb.append( "        Simple authentication : '" ).append( ((SimpleAuthentication)authentication).getSimple().toString()
).append("'\n");
+            sb.append( "        Simple authentication : '" )
+              .append( ( ( SimpleAuthentication ) authentication ).getSimple().toString()
).append(
+                "'\n" );
         }
         else
         {
-            sb.append( "        Sasl credentials\n" );
-            sb.append( "            Mechanism :'" ).append( ((SaslCredentials)authentication).getMechanism().toString()
).append("'\n");
-            
-            if ( ( (SaslCredentials)authentication ).getCredentials() != null )
-            {
-                sb.append( "            Credentials :'" ).append( ((SaslCredentials)authentication).getCredentials().toString()
).append("'\n");
-            }
+            sb.append( ( ( SaslCredentials ) authentication ).toString() );
         }
 
         return sb.toString();
     }
-    
 }



Mime
View raw message