[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-739) Exception reading PackageBuilder errors
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Wed Mar 28 14:18:08 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-739?page=all ]
Edson Tirelli resolved JBRULES-739.
-----------------------------------
Fix Version/s: 3.1-m2
Resolution: Done
Problem fixed.
Thank you for reporting and providing test case.
> Exception reading PackageBuilder errors
> ---------------------------------------
>
> Key: JBRULES-739
> URL: http://jira.jboss.com/jira/browse/JBRULES-739
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 3.1-m2
> Reporter: Dirk Bergstrom
> Assigned To: Edson Tirelli
> Fix For: 3.1-m2
>
> Attachments: Bug.java
>
>
> Using trunk (revision 10170), I get an exception when trying to read errors after calling PackageBuilder.addPackageFromDrl(String, Reader) with any DSL file. The getErrors() method spits out this exception:
> java.lang.ArrayStoreException
> at java.lang.System.arraycopy(Native Method)
> at java.util.ArrayList.toArray(ArrayList.java:304)
> at org.drools.compiler.PackageBuilder.getErrors(PackageBuilder.java:380)
> (The docs for toArray say that exception is thrown if one of the members of the
> List is the wrong class for the supplied array.)
> If I instead call printErrors, I get something more useful:
> java.lang.ClassCastException: org.drools.lang.ExpanderException
> at org.drools.compiler.PackageBuilder.printErrors(PackageBuilder.java:390)
> If I call PackageBuilder.addPackageFromDrl(String), I get no errors. So there are two issues:
> *) The DSL parser is busted
> *) PackageBuilder is putting incompatible Exceptions in the errors Collection.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list