[jbosstools-issues] [JBoss JIRA] (JBIDE-22283) reveng *.java emitter does not escape java keyword 'return' as variable name
Koen Aers (JIRA)
issues at jboss.org
Wed Jul 20 08:59:00 EDT 2016
[ https://issues.jboss.org/browse/JBIDE-22283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Koen Aers resolved JBIDE-22283.
-------------------------------
Resolution: Rejected
I was able to reproduce this issue (see https://github.com/hibernate/hibernate-tools/commit/eb564fd1e7bd1b6582fb88b256a38e3a541d6e25) but I have come to the conclusion that it is a user problem. The use of the 'return' name is a choice of the user and can simply be worked around by naming the property 'return_' instead in the reveng,xml file. So I am going to resolve this issue as rejected. Feel free to put in new arguments if you think this is not correct.
> reveng *.java emitter does not escape java keyword 'return' as variable name
> ----------------------------------------------------------------------------
>
> Key: JBIDE-22283
> URL: https://issues.jboss.org/browse/JBIDE-22283
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: hibernate
> Affects Versions: 4.3.x
> Environment: Eclipse Mars
> Reporter: Darryl Miles
> Assignee: Koen Aers
> Fix For: 4.4.1.AM2
>
>
> reveng *.java emitter does not escape java keyword 'return' as variable name
> <table name="oc_return_history">
> <foreign-key constraint-name="FK_oc_return_history__return_id" foreign-table="oc_return">
> <column-ref local-column="return_id" foreign-column="return_id"/>
> <!-- this breaks the generator trying to name local variable as a java keyword -->
> <many-to-one property="return"/>
> </foreign-key>
> </table>
> The expected output would be:
> private Return _return;
> but actual output is:
> private Return return;
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list