directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Faiz (JIRA)" <directory-...@incubator.apache.org>
Subject [jira] Created: (DIREVE-252) patch - fixed ClassCastException issuing from ValueNormalizingVisitor.java in core
Date Fri, 16 Sep 2005 00:05:54 GMT
patch - fixed ClassCastException issuing from ValueNormalizingVisitor.java in core
----------------------------------------------------------------------------------

         Key: DIREVE-252
         URL: http://issues.apache.org/jira/browse/DIREVE-252
     Project: Directory Server
        Type: Bug
  Components: server main  
    Versions: 0.9.2    
    Reporter: Nick Faiz
 Assigned to: Alex Karasulu 


This is a five minute task.
 
> Nick Faiz wrote:
> 
>> Hi,
>>
>> I found a ClassCastException being issued on 
>> ValueNormalizingVisitor.java in core.
>>
>> It looks like an easy fix; wrap the cast in a type check.
>>
>>       if (node instanceof BranchNode)
>>         {
>>             BranchNode bnode = ( BranchNode ) node;
>>             final int size = bnode.getChildren().size();
>>             for ( int ii = 0; ii < size ; ii++ )
>>             {
>>                 visit( ( ExprNode ) bnode.getChildren().get( ii ) );
>>             }
>>         }
>>
>> I think this is okay because it was trying to cast a PresenceNode 
>> (LeafNode) into a branch node. This looks like normal tree traversal, 
>> so I assume it's okay to not visit any further nodes if the node is a 
>> LeafNode.
>>
>> Cheers,
>> Nick
>>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message