I think there may be a bug in MVEL 2.0. If I do the following, I get a
runtime exception:
with (actionCodeSecurity = new ActionCodeSecurity()) {
securityCategory = securityCategory,
actionCode = "AA",
visitTypeConstraint = 1,
visitTypeList = "IP, OP"
}
However, if I remove the comma between IP and OP it works:
visitTypeList = "IP OP"
Also, it works fine if I do all my assignments without the 'with' clause:
actionCodeSecurity = new ActionCodeSecurity()
actionCodeSecurity.securityCategory = securityCategory
actionCodeSecurity.actionCode = "AA"
actionCodeSecurity.visitTypeConstraint = 1
actionCodeSecurity.visitTypeList = "IP, OP"
I'm using the version of MVEL that shipped with Drools 5.0 Final build,
Eclipse Workbench, May 19, 2009.
--
View this message in context:
http://www.nabble.com/MVEL-2.0-bug-in-%27with%27-block-tp24261697p2426169...
Sent from the drools - user mailing list archive at
Nabble.com.