persistence@glassfish.java.net

Re: code review for issue 550

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Mon, 25 Sep 2006 20:05:41 +0200

Hi Jielin,

the changes in EJBQLParser.g look good. A minor change to the test
cases. Maybe you can update the message given to the assertTrue call.
E.g. the first message could be something like: "Failed to throw
expected IllegalArgumentException for a query using invalid keyword
FORM". The message in the second test case could be: "Failed to throw
expected IllegalArgumentException for a query having an unexpected
keyword FROM.", etc. What do you think?

Regards Michael

> Hi, Michael/Tom,
>
> Please review the changes for issue 550
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=550
> The JPQL query compiler sometimes throws a misleading error message
> for an invalid query. It complains about an unexpected token, where
> the token named in the error message is correct, but the following
> token is unexpected.
>
> The problem is in EJBQLParser.g. I fix several places in .g file to
> cover 10 different test cases. Also the test cases are added to
> JUnitEJBQLValidationTestSuite.java.
>
> Thanks.
>
> Jielin