[
https://issues.jboss.org/browse/JBRULES-3118?page=com.atlassian.jira.plug...
]
Edson Tirelli commented on JBRULES-3118:
----------------------------------------
"enum" is a reserved keyword in Java 1.5+, so you can't define a package
name that contains it.
http://commons.apache.org/lang/api-2.3/org/apache/commons/lang/enum/Enum....
"Deprecated. Replaced by org.apache.commons.lang.enums.Enum and will be removed in
version 3.0. All classes in this package are deprecated and repackaged to
org.apache.commons.lang.enums since enum is a Java 1.5 keyword."
I don't think there is anything we can (should) do here, as this is a Java compilation
error, not a drools compilation error.
Parser: import of class with "enum" in the FQN fails to
parse
-------------------------------------------------------------
Key: JBRULES-3118
URL:
https://issues.jboss.org/browse/JBRULES-3118
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 5.2.0.Final
Reporter: Michael Anstis
Assignee: Edson Tirelli
The following DRL fails to compile, with error "Syntax error on token
"enum", Identifier expected."
package com.sample
import com.sample.DroolsTest.Message;
//The "enum" sub-package causes the problem, not "Enum" class
import org.apache.commons.lang.enum.Enum
rule "Hello World"
when
m : Message( status == Message.HELLO, myMessage : message )
then
System.out.println( myMessage );
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
update( m );
end
rule "GoodBye"
when
Message( status == Message.GOODBYE, myMessage : message )
then
System.out.println( myMessage );
end
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira