[
https://issues.jboss.org/browse/DROOLS-815?page=com.atlassian.jira.plugin...
]
Mario Fusco commented on DROOLS-815:
------------------------------------
I tried the following test case and it works for me. Do you have any other example
demonstrating the problem?
{code}
public static class $X {
public static class $Y {
private final int value;
public $Y( int value ) {
this.value = value;
}
public int getValue() {
return value;
}
}
}
@Test
public void testDoubleNestedClass() {
String drl =
"import " + $X.$Y.class.getCanonicalName() + ";\n" +
"global java.util.List list\n" +
"rule R when\n" +
" $X.$Y($v : value)\n" +
"then\n" +
" list.add($v);\n" +
"end";
KieSession ksession = new KieHelper().addContent(drl, ResourceType.DRL)
.build()
.newKieSession();
List<String> list = new ArrayList<String>();
ksession.setGlobal( "list", list );
ksession.insert( new $X.$Y(42) );
ksession.fireAllRules();
assertEquals( 1, list.size() );
assertEquals( 42, list.get(0) );
}
{code}
Ensure type declarations can handle inner classes
-------------------------------------------------
Key: DROOLS-815
URL:
https://issues.jboss.org/browse/DROOLS-815
Project: Drools
Issue Type: Bug
Affects Versions: 6.3.0.Beta1
Reporter: Davide Sottara
Assignee: Mario Fusco
Priority: Minor
Verify that deeply nested classes can be handled correclty, even in edge cases
{code}
public class Foo {
public static class $X {
public static class $Y {
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)