directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r491701 - /directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java
Date Mon, 01 Jan 2007 23:30:09 GMT
Author: elecharny
Date: Mon Jan  1 15:30:08 2007
New Revision: 491701

URL: http://svn.apache.org/viewvc?view=rev&rev=491701
Log:
Added a throw if dn is not an instance of a known object

Modified:
    directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java

Modified: directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java?view=diff&rev=491701&r1=491700&r2=491701
==============================================================================
--- directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java
(original)
+++ directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnNormalizer.java
Mon Jan  1 15:30:08 2007
@@ -63,6 +63,7 @@
     public Object normalize( Object value ) throws NamingException
     {
         LdapDN dn = null;
+        
         if ( value instanceof LdapDN )
         {
             dn = ( LdapDN ) ( ( LdapDN ) value ).clone();
@@ -74,6 +75,11 @@
         else if ( value instanceof String )
         {
             dn = new LdapDN( ( String ) value );
+        }
+        else
+        {
+            throw new IllegalStateException( "I do not know how to handle dn normalization
with objects of class: " 
+                + (value == null ? null : value.getClass() ) );
         }
         
         dn.normalize( attrRegistry.getNormalizerMapping() );



Mime
View raw message