Declarative types: Extending requires explicit import statement
---------------------------------------------------------------
Key: JBRULES-3133
URL:
https://issues.jboss.org/browse/JBRULES-3133
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.Final
Reporter: Michael Anstis
Assignee: Mark Proctor
Given Person class:-
{code}
package com.guvnor.domain;
import java.math.BigDecimal;
public class Person {
private BigDecimal salary;
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
}
{code}
The following compiles OK:-
{code}
package com.sample
import com.guvnor.domain.Person
declare Person
end
{code}
However the following does not (without explicitly importing java.math.BigDecimal - which
is a field type in Person):-
{code}
package com.sample
import com.guvnor.domain.Person
import com.guvnor.domain.Address
declare Person
end
declare Person2 extends Person
flange : String
end
{code}
Error being "Unknown DroolsError class org.drools.compiler.TypeDeclarationError:
Unable to find class 'BigDecimal' ".
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira