directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r428562 - /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Date Thu, 03 Aug 2006 23:23:18 GMT
Author: elecharny
Date: Thu Aug  3 16:23:17 2006
New Revision: 428562

URL: http://svn.apache.org/viewvc?rev=428562&view=rev
Log:
Fixed half of DIRSERVER-693. No more NPE in LdapResult.toString() method

Modified:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?rev=428562&r1=428561&r2=428562&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Thu Aug  3 16:23:17 2006
@@ -546,8 +546,8 @@
                 sb.append( "Unknown error code : " ).append( resultCode );
         }
 
-        sb.append( "            Matched DN : '" ).append( matchedDN.toString() ).append(
"'\n" );
-        sb.append( "            Error message : '" ).append( errorMessage.toString() ).append(
"'\n" );
+        sb.append( "            Matched DN : '" ).append( matchedDN == null ? "": matchedDN.toString()
).append( "'\n" );
+        sb.append( "            Error message : '" ).append( errorMessage == null ? "" :
errorMessage.toString() ).append( "'\n" );
 
         if ( referrals.size() != 0 )
         {
@@ -558,7 +558,7 @@
 
                 LdapURL referral = ( LdapURL ) referrals.get( i );
 
-                sb.append( "                Referral[" ).append( i ).append( "] :" ).append(
referral.toString() )
+                sb.append( "                Referral[" ).append( i ).append( "] :" ).append(
referral == null ? "" : referral.toString() )
                     .append( '\n' );
             }
         }



Mime
View raw message