persistence@glassfish.java.net

JPQL: fix ClassCastException if second MOD argument is a field access expression

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Tue, 10 Apr 2007 20:44:10 +0200

Hi Tom,

attached you find my changes to fix issue 2771 "MOD does not allow field
expressions on both sides"
(https://glassfish.dev.java.net/issues/show_bug.cgi?id=2771).

The MOD implementation in ModNode assumed that the second argument of a
MOD function call is always an integer literal .I changed the
implementation to be similar to PlusNode, MinusNode, etc. You find the
fix and new test cases attached. Please have a look.

Thanks!

Regards Michael