javacc
  1. javacc
  2. JAVACC-225

incohenrent generate_generics behavior

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3
    • Component/s: jjtree
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      225

      Description

      If you set JDK_VERSION >= 1.5 in a jjt and in a jj file it will force
      GENERATE_GENERICS to true for one and not for the other.
      This is because a java block of the expansion_unit

      { Options.normalize(); }

      appears in the javacc_options() production in JavaCC.jj but not in the JJTree.jjt.
      I believe it should appear in both.
      This implies that an additional import be also added in the JJTree.jjt file:
      import org.javacc.parser.Options;

      Therefore if you set JDK_VERSION >= 1.5 it will always generate appropriate
      generics, unless you don't want by setting also GENERATE_GENERICS = false;

        Activity

        Hide
        paulcager added a comment -

        Reassign for fix

        Show
        paulcager added a comment - Reassign for fix
        Hide
        paulcager added a comment -

        Thanks for your report, and you are quite right - it was a missing call to
        normalize().

        Fixed in 4.3

            • This issue has been marked as a duplicate of 214 ***
        Show
        paulcager added a comment - Thanks for your report, and you are quite right - it was a missing call to normalize(). Fixed in 4.3 This issue has been marked as a duplicate of 214 ***
        Hide
        paulcager added a comment -

        Added fix version to issue

        Show
        paulcager added a comment - Added fix version to issue

          People

          • Assignee:
            paulcager
            Reporter:
            marc_mazas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: