[jboss-jira] [JBoss JIRA] (JBRULES-3057) Misleading error message for missing constructor
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Wed Feb 1 05:26:06 EST 2012
[ https://issues.jboss.org/browse/JBRULES-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Geoffrey De Smet updated JBRULES-3057:
--------------------------------------
Fix Version/s: 5.4.0.Beta3
(was: 5.4.0.Beta2)
> Misleading error message for missing constructor
> ------------------------------------------------
>
> Key: JBRULES-3057
> URL: https://issues.jboss.org/browse/JBRULES-3057
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler (expert)
> Affects Versions: 5.2.0.CR1
> Reporter: Wolfgang Laun
> Assignee: Edson Tirelli
> Fix For: 5.4.0.Beta3
>
>
> If an undeclared constructor is called in a consequence, a very strange error message is produced:
> - error text is "Failed to compileShared" ("Shared" is not used by the app)
> - The message part meant ot identify the location of the error is misleanding, e.g.,
> Near : {... p3.setName( "Paul" ); ....}
> with the marker ("^") pointing to "Paul".
> public static class Person {
> private String name;
> public Person(String name){
> this.name = name;
> }
> public String getField1() {
> return field1;
> }
> public void setName( String name ) {
> this.name = name;
> }
> public String getName() {
> return name;
> }
> }
> @Test
> public void testExistsIterativeModifyBug() {
> String str = "";
> str += "package org.simple ";
> str += "import Person ";
> str += "rule xxx ";
> str += "when ";
> str += "then ";
> str += " Person = new Person() ";
> str += "end ";
> KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
> assertFalse( kBuilder.hasErrors() );
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
> ksession.fireAllRules();
> ksession.dispose();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list