directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r411931 - /directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Date Mon, 05 Jun 2006 21:58:06 GMT
Author: elecharny
Date: Mon Jun  5 14:58:06 2006
New Revision: 411931

URL: http://svn.apache.org/viewvc?rev=411931&view=rev
Log:
Fixed a nasty NPE in LdapDN : getBytes( LdapDn ) was not handling a null dn

Modified:
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=411931&r1=411930&r2=411931&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
(original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Mon Jun  5 14:58:06 2006
@@ -501,9 +501,9 @@
      * 
      * @return A byte[] representation of the DN
      */
-    public static byte[] getBytes( Name dn )
+    public static byte[] getBytes( LdapDN dn )
     {
-        return ( ( LdapDN ) dn ).bytes;
+        return dn == null ? null : dn.bytes;
     }
 
 



Mime
View raw message