[jboss-jira] [JBoss JIRA] Created: (JBRULES-739) Exception reading PackageBuilder errors

Dirk Bergstrom (JIRA) jira-events at lists.jboss.org
Thu Mar 15 19:38:25 EDT 2007


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: Mark Proctor
         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