directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DIRSERVER-351) patch - fixed ClassCastException issuing from ValueNormalizingVisitor.java in core
Date Sat, 21 Apr 2007 11:18:16 GMT

     [ https://issues.apache.org/jira/browse/DIRSERVER-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny closed DIRSERVER-351.
---------------------------------------


Closing all issues created in 2005 and before which are marked resolved

> patch - fixed ClassCastException issuing from ValueNormalizingVisitor.java in core
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-351
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-351
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Nick Faiz
>         Assigned To: Alex Karasulu
>         Attachments: ValueNormalizingVisitor.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message