directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r463686 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Date Fri, 13 Oct 2006 14:15:56 GMT
Author: elecharny
Date: Fri Oct 13 07:15:55 2006
New Revision: 463686

URL: http://svn.apache.org/viewvc?view=rev&rev=463686
Log:
Added a test in toString() method to avoid a NPE

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

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?view=diff&rev=463686&r1=463685&r2=463686
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Fri Oct 13 07:15:55 2006
@@ -605,7 +605,8 @@
         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 )
+        
+        if ( ( referrals != null ) && ( referrals.size() != 0 ) )
         {
             sb.append( "            Referrals :\n" );
 



Mime
View raw message