[
https://issues.jboss.org/browse/DROOLS-4051?page=com.atlassian.jira.plugi...
]
Mario Fusco resolved DROOLS-4051.
---------------------------------
Resolution: Won't Fix
We use the keyword 'declare' both to define a brand new type and to add new
declaration on an existing type. Normally there is no ambiguity because in case you want
to perform a redeclaration you have to import the existing type. Unfortunately this
doesn't work for classes in java.lang package that is imported automatically, so in
that specific case there's no way to disambiguate (do you want to define a new Process
type or for instance flag java.lang.Process as an event?) and then the only way to resolve
the ambiguity is using the fully qualified name as you alredy discovered.
Wrong compiled type definition
------------------------------
Key: DROOLS-4051
URL:
https://issues.jboss.org/browse/DROOLS-4051
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.21.0.Final
Reporter: Stéphane Tondini
Assignee: Mario Fusco
Priority: Major
I defined a drl file that declare a type like :
{code}
package com.test.rules.model.process;
// Process related objects
declare Process
caseRef : String @key
owner : String @key
end
{code}
At rules compile time, Drools throws the following exception :
{code}
Caused by: java.lang.IllegalArgumentException: Error parsing bootstrap resources : New
declaration of java.lang.Process can't declare a different set of fields
existing : []
declared : [caseRef]
diff : [++caseRef]
Unable to process type Process
{code}
Drools compiles *java.lang.Process* instead of my customized type.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)