directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r290055 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java
Date Mon, 19 Sep 2005 03:32:22 GMT
Author: akarasulu
Date: Sun Sep 18 20:32:20 2005
New Revision: 290055

URL: http://svn.apache.org/viewcvs?rev=290055&view=rev
Log:
applying patch from Nick Faiz from DIREVE-252 to prevent class cast exceptions

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java?rev=290055&r1=290054&r2=290055&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/normalization/ValueNormalizingVisitor.java
Sun Sep 18 20:32:20 2005
@@ -75,11 +75,14 @@
             return;
         }
 
-        BranchNode bnode = ( BranchNode ) node;
-        final int size = bnode.getChildren().size();
-        for ( int ii = 0; ii < size ; ii++ )
+        if (node instanceof BranchNode)
         {
-            visit( ( ExprNode ) bnode.getChildren().get( ii ) );
+            BranchNode bnode = ( BranchNode ) node;
+            final int size = bnode.getChildren().size();
+            for ( int ii = 0; ii < size ; ii++ )
+            {
+                visit( ( ExprNode ) bnode.getChildren().get( ii ) );
+            }
         }
     }
 



Mime
View raw message