Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 82651 invoked from network); 19 Sep 2005 03:37:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Sep 2005 03:37:01 -0000 Received: (qmail 89582 invoked by uid 500); 19 Sep 2005 03:37:00 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 89517 invoked by uid 500); 19 Sep 2005 03:36:59 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 89504 invoked by uid 99); 19 Sep 2005 03:36:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 20:36:58 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 46822124 for ; Mon, 19 Sep 2005 05:36:54 +0200 (CEST) Message-ID: <901803877.1127101014265.JavaMail.jira@ajax.apache.org> Date: Mon, 19 Sep 2005 05:36:54 +0200 (CEST) From: "Alex Karasulu (JIRA)" To: dev@directory.apache.org Subject: [jira] Resolved: (DIREVE-252) patch - fixed ClassCastException issuing from ValueNormalizingVisitor.java in core In-Reply-To: <1679598163.1126829154449.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIREVE-252?page=all ] Alex Karasulu resolved DIREVE-252: ---------------------------------- Fix Version: 0.9.3 Resolution: Fixed committed changes in revision 290055 here: http://svn.apache.org/viewcvs.cgi?view=rev&rev=290055 You rock dude, thanks for the fix! No biggy but next time please see if you could submit a patch instead of the whole file: helps to quickly see what changed. > 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 > Assignee: Alex Karasulu > Fix For: 0.9.3 > 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. - 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