[rules-users] MVEL 2.0 bug in 'with' block

Dan Seaver dan.seaver at ge.com
Mon Jun 29 19:19:09 EDT 2009


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-tp24261697p24261697.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list