]
Mark Proctor closed JBRULES-1931.
---------------------------------
Resolution: Won't Fix
KnowledgeBaseImpl.addKnowledgePackage requires the KP to be a KPImpl
--------------------------------------------------------------------
Key: JBRULES-1931
URL:
https://jira.jboss.org/jira/browse/JBRULES-1931
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.0.0.M5
Reporter: peter royal
Assignee: Mark Proctor
Priority: Minor
Wanting to hand-roll my own rules, I started out by instantiating a KnowledgeBase and
went to add a KnowledgePackage.
I was then confronted with:
{noformat}
java.lang.ClassCastException: com.example.MyKP cannot be cast to
org.drools.definitions.impl.KnowledgePackageImp
at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:115)
{noformat}
.. while API wrappers are appreciated, if one can't pass in alternate implementations
of interfaces, the dependency should be on the required type, rather than allowing a
ClassCastException to occur at runtime
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: