directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209345 - in /directory/sandbox/trunk/asn1-new-codec/src: java/org/apache/asn1/ldap/pojo/DelRequest.java test/org/apache/asn1/ldap/codec/DelRequestTest.java
Date Tue, 05 Jul 2005 23:06:36 GMT
Author: elecharny
Date: Tue Jul  5 16:06:33 2005
New Revision: 209345

URL: http://svn.apache.org/viewcvs?rev=209345&view=rev
Log:
- Added a toString() method
- polished the code

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/DelRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/DelRequest.java?rev=209345&r1=209344&r2=209345&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/DelRequest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/DelRequest.java
Tue Jul  5 16:06:33 2005
@@ -63,4 +63,20 @@
     {
         this.entry = entry;
     }
+
+    /**
+     * Return a String representing a DelRequest
+     * 
+     * @return A DelRequest String
+     */
+    public String toString()
+    {
+
+        StringBuffer sb = new StringBuffer();
+
+        sb.append( "    Del request\n" );
+        sb.append( "        Entry : '" ).append( entry.toString() ).append( "'\n" );
+
+        return sb.toString();
+    }
 }

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/DelRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/DelRequestTest.java?rev=209345&r1=209344&r2=209345&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/DelRequestTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/DelRequestTest.java
Tue Jul  5 16:06:33 2005
@@ -68,9 +68,10 @@
 
         stream.flip();
 
-        // Allocate a DelRequest Container
+        // Allocate a LdapMessage Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode a DelRequest PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );
@@ -81,6 +82,7 @@
             Assert.fail( de.getMessage() );
         }
     	
+        // Check the decoded DelRequest PDU
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         DelRequest delRequest      = message.getDelRequest();
 
@@ -111,9 +113,10 @@
 
         stream.flip();
 
-        // Allocate a DelRequest Container
+        // Allocate a LdapMessage Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode a DelRequest PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );



Mime
View raw message