Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-22283

reveng *.java emitter does not escape java keyword 'return' as variable name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.4.1.AM3
    • 4.3.x
    • hibernate
    • None
    • devex #118 July 2016
    • 8

      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;

            kaers@redhat.com Koen Aers
            darryl.miles@dlmc.co.uk Darryl Miles (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: