directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r504563 - /directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java
Date Wed, 07 Feb 2007 14:36:52 GMT
Author: elecharny
Date: Wed Feb  7 06:36:51 2007
New Revision: 504563

URL: http://svn.apache.org/viewvc?view=rev&rev=504563
Log:
Added a check : if the dn is not an instance of String, Name of LdapDN,
a NamingException is thrown instead of a NPE

Modified:
    directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java

Modified: directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java?view=diff&rev=504563&r1=504562&r2=504563
==============================================================================
--- directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java
(original)
+++ directory/apacheds/branches/1.0/core/src/main/java/org/apache/directory/server/core/schema/DnNormalizer.java
Wed Feb  7 06:36:51 2007
@@ -60,6 +60,10 @@
         {
             dn = new LdapDN( ( String ) value );
         }
+        else
+        {
+            throw new NamingException( "The DN is not an instance of String, Name or LdapDN"
);
+        }
         
         dn.normalize( attrRegistry.getNormalizerMapping() );
         return dn.getNormName();



Mime
View raw message