Toshiya Kobayashi created DROOLS-6032:
-----------------------------------------
Summary: Class name conflict by class "D" in exec-model
Key: DROOLS-6032
URL:
https://issues.redhat.com/browse/DROOLS-6032
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.50.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
If you use a fact class named "D", you will hit errors while executable-model
code generation.
{code:java}
@Test
public void testClassNameConflict() {
String str =
"import " + D.class.getCanonicalName() + ";" +
"rule R when\n" +
" D(name == \"John\")\n" +
"then\n" +
"end";
KieSession ksession = getKieSession( str );
D fact = new D("John");
ksession.insert( fact );
assertEquals(1, ksession.fireAllRules());
}
public static class D {
private String name;
public D(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)