[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5085) Literals with leading zero in HQL validated as octal but used as decimal
James Livingston (JIRA)
noreply at atlassian.com
Wed Apr 7 20:41:42 EDT 2010
Literals with leading zero in HQL validated as octal but used as decimal
------------------------------------------------------------------------
Key: HHH-5085
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5085
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.2
Reporter: James Livingston
Priority: Minor
The grammar used to parse HQL/JPAQL treats numeric literals[0] with a leading 0 as octal (and 0x as hexadecimal), however those values are always converted[1] as base 10. This means that a literal 0100 will match a value of decimal one hundred, but a literal of 0108 will fail to validate due to the '8' character.
Either the grammar should not handle octal/hexadecimal, or the conversation should process them correctly.
[0] Starting at line 831 of core/src/main/antlr/hql.g in the 3.3.2 source
[1] LiteralProcessor.determineIntegerRepresentation()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list