directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r345875 - /directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java
Date Mon, 21 Nov 2005 09:13:20 GMT
Author: elecharny
Date: Mon Nov 21 01:13:13 2005
New Revision: 345875

URL: http://svn.apache.org/viewcvs?rev=345875&view=rev
Log:
- Protect the code from NPE

Modified:
    directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java

Modified: directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java?rev=345875&r1=345874&r2=345875&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java
(original)
+++ directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/DnNormalizer.java
Mon Nov 21 01:13:13 2005
@@ -89,6 +89,11 @@
      */
     public Object normalize( Object value ) throws NamingException
     {
+        if ( value == null )
+        {
+            return null;
+        }
+        
         String str = null ;
 
         if ( value instanceof Name )



Mime
View raw message