Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 38074 invoked from network); 7 Jan 2009 14:58:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 14:58:27 -0000 Received: (qmail 20311 invoked by uid 500); 7 Jan 2009 14:58:25 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 20078 invoked by uid 500); 7 Jan 2009 14:58:25 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 20067 invoked by uid 99); 7 Jan 2009 14:58:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 06:58:25 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 72.14.220.155 as permitted sender) Received: from [72.14.220.155] (HELO fg-out-1718.google.com) (72.14.220.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 14:58:17 +0000 Received: by fg-out-1718.google.com with SMTP id 13so1341852fge.24 for ; Wed, 07 Jan 2009 06:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=Sy7mSBoqoaoXC+KmTtKFkPt5OXfcvMEaDMVbIlvx94E=; b=CNXUR4YcIIuqCiGQx5Jf1miBjQ16lbMFqKtpV9ZdlAiJ1BjUf9g3+utqIVnMpqDiec s6DeDb6oyjghxnbheN2ZbrPOQUYzJueb/wOdS/OtzGkdvAQ/Y2Inyp1dID+deg4SeyuP IyX8FGWeKNfYzV8h2Xs1JR6pFFDK/UTJK8Wmk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=g4Z0q5DPGsZAnykzye4MIp1aVUwhbiDyUQ2DIe6+7ZtAeEiL2Y3JRcz9r4l4THsQSi k3uyJmj/xVIuM2OBNVegR3ZukPRRKzPbJzWFRnGUnOTY7KNqYGv+tULhRSoRYFJB0lZ5 o6AWkIkaMaDRR9oMzbrVIJfkTQKDjQCBzu0b0= Received: by 10.86.94.11 with SMTP id r11mr13542401fgb.53.1231340276848; Wed, 07 Jan 2009 06:57:56 -0800 (PST) Received: by 10.86.51.7 with HTTP; Wed, 7 Jan 2009 06:57:56 -0800 (PST) Message-ID: <25aac9fc0901070657k10e55594y174430c967088de8@mail.gmail.com> Date: Wed, 7 Jan 2009 14:57:56 +0000 From: sebb To: "Commons Developers List" Subject: [SCXML] Class cast due to "bad" test data [was Re: svn commit: r732174 -etc] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org On 07/01/2009, Rahul Akolkar wrote: > On Wed, Jan 7, 2009 at 12:36 AM, Rahul Akolkar wrote: > > On Tue, Jan 6, 2009 at 9:46 PM, sebb wrote: > > > > >> > >> By the way, the Exception handling changes have revealed a possible > >> bug - a class cast was being swallowed: > >> > >> testExample01Sample(org.apache.commons.scxml.env.javascript.JSExampleTest) > >> Time elapsed: 0.281 sec <<< ERROR! > >> java.lang.ClassCastException: java.lang.Double cannot be cast to > >> org.w3c.dom.Node > >> at org.apache.commons.scxml.env.javascript.JSEvaluator.evalLocation(JSEvaluator.java:195) > >> > >> This was previously being converted to a SCXMLExpressionException. > >> > > > > > > I'll take a look now -- thats the package I'm least familiar with so > > it'll be good to go through it anyway. > > > > > > Turned out to be an error in the test document, should be fixed. > I see that you have chnaged the test data, and it now passes the test. However, what if a user has such a document? Should it really generate a Class Cast Exception? It looks like the error was not being detected previously because the ClassCast was converted to SCXMLExpressionException which was being handled by the Assign class. Is that the correct behaviour for invalid data? I think at the very least the code needs to catch the Class Cast. > -Rahul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org