directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209233 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslCredentials.java
Date Tue, 05 Jul 2005 06:42:59 GMT
Author: elecharny
Date: Mon Jul  4 23:42:58 2005
New Revision: 209233

URL: http://svn.apache.org/viewcvs?rev=209233&view=rev
Log:
Added a toString() method

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslCredentials.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslCredentials.java?rev=209233&r1=209232&r2=209233&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslCredentials.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslCredentials.java
Mon Jul  4 23:42:58 2005
@@ -50,7 +50,6 @@
      */
     public OctetString getCredentials()
     {
-
         return credentials;
     }
 
@@ -72,7 +71,7 @@
     public String getMechanism()
     {
 
-        return (mechanism == null ? null : mechanism.toString());
+        return ( ( mechanism == null ) ? null : mechanism.toString() );
     }
 
     /**
@@ -83,5 +82,27 @@
     public void setMechanism( LdapString mechanism )
     {
         this.mechanism = mechanism;
+    }
+
+    /**
+     * Get a String representation of a SaslCredential
+     *
+     * @return A SaslCredential String 
+     */
+    public String toString()
+    {
+
+        StringBuffer sb = new StringBuffer();
+
+        sb.append( "        Sasl credentials\n" );
+        sb.append( "            Mechanism :'" ).append( mechanism.toString() ).append( "'\n"
);
+
+        if ( credentials != null )
+        {
+            sb.append( "            Credentials :'" ).append( credentials.toString() ).append(
+                "'\n" );
+        }
+
+        return sb.toString();
     }
 }



Mime
View raw message