Hide Forgot
Created attachment 530009 [details] Simple reproducer Description of problem: You have a POJO class Person and in DRL fact type SomePerson. If you try to use Person in different package to declare another fact the Parser replaces Person with SomePerson. Version-Release number of selected component (if applicable): BRMS-5.3.0-dev4 How reproducible: Every time Steps to Reproduce: 1. Run attached example Actual results: Rule Compilation error : [Rule name='create holder'] org/jboss/qa/brms/importreplace/Rule_create_holder.java (7:433) : The constructor Holder(Person) is undefined Expected results: Finished... Additional info: If you put full name of the class, the problem is solved and if you declare facts in same file the problem is gone as well.
Bug fixed in branches 5.3.x and master: https://github.com/droolsjbpm/drools/commit/67e864be305fa5638fbf9b903998ae165b8d5a60
Please verify the issue on 5.3 ER4.
Verified.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: When a class contained a class Person and a DRL fact type somePerson, attempting to use Person in a different package to declare another fact, Person would be replaced with somePerson. This was because PackageBuilder checked for declared names that ended with the same string. This has been resolved and PackageBuilder now checks for equality in declared names.