directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 57025 - incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder
Date Tue, 09 Nov 2004 12:36:58 GMT
Author: akarasulu
Date: Tue Nov  9 04:36:57 2004
New Revision: 57025

Modified:
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/LdapResultEncoder.java
Log:
fixing posible null pointer exceptions on matched DN

Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/LdapResultEncoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/LdapResultEncoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/LdapResultEncoder.java
Tue Nov  9 04:36:57 2004
@@ -51,8 +51,15 @@
         top.addLast( child );
         child.setParent( top );
 
-        child = ( DefaultMutableTupleNode ) EncoderUtils.encode(
-                result.getMatchedDn() );
+        if ( result.getMatchedDn() == null )
+        {
+            child = ( DefaultMutableTupleNode ) EncoderUtils.encode( "" );
+        }
+        else
+        {
+            child = ( DefaultMutableTupleNode ) EncoderUtils.encode( result.getMatchedDn()
);
+        }
+
         top.addLast( child );
         child.setParent( top );
 

Mime
View raw message