directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r161395 - directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslAuthenticationPOJO.java
Date Fri, 15 Apr 2005 05:36:07 GMT
Author: elecharny
Date: Thu Apr 14 22:36:07 2005
New Revision: 161395

URL: http://svn.apache.org/viewcvs?view=rev&rev=161395
Log:
Changed the MutableString credentials element to a byte[] credentials element, as it's an
OCTET STRING.
Used MutableString instead of String

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslAuthenticationPOJO.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslAuthenticationPOJO.java?view=diff&r1=161394&r2=161395
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslAuthenticationPOJO.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/SaslAuthenticationPOJO.java
Thu Apr 14 22:36:07 2005
@@ -16,6 +16,8 @@
  */
 package org.apache.asn1.ldap.pojo;
 
+import org.apache.asn1.util.MutableString;
+
 
 /**
  * A POJO which stores the SASL authentication of a BindRequest.
@@ -32,10 +34,10 @@
      * SKEY,
      * EXTERNAL
      **/
-    private String mechanism;
+    private MutableString mechanism;
 
     /** optional credentials of the user */
-    private String credentials;
+    private byte[] credentials;
 
     //~ Methods ------------------------------------------------------------------------------------
 
@@ -44,7 +46,7 @@
      *
      * @return The credentials
      */
-    public String getCredentials()
+    public byte[] getCredentials()
     {
 
         return credentials;
@@ -55,7 +57,7 @@
      *
      * @param credentials The credentials
      */
-    public void setCredentials( String credentials )
+    public void setCredentials( byte[] credentials )
     {
         this.credentials = credentials;
     }
@@ -68,7 +70,7 @@
     public String getMechanism()
     {
 
-        return mechanism;
+        return mechanism.toString();
     }
 
     /**
@@ -76,7 +78,7 @@
      *
      * @param mechanism The mechanism
      */
-    public void setMechanism( String mechanism )
+    public void setMechanism( MutableString mechanism )
     {
         this.mechanism = mechanism;
     }
@@ -86,8 +88,13 @@
      */
     public void free() 
     {
-    	mechanism = null;
-    	credentials = null;
+    	if (mechanism != null)
+    	    {
+    	    mechanism.free();
+    	    }
+    	
+   	    credentials = null;
+    	
     	super.free();
     }
 }



Mime
View raw message