Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8194268

Incorrect parameter names for synthetic methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 10
    • tools
    • None
    • b01

      MethodSymbol.params() generates parameter names if the symbols' params field has not been set externally. Currently an index variable [1] is never incremented, so the names will always be arg0 (instead of arg0, arg1, ...).

      The bug was introduced in http://hg.openjdk.java.net/jdk/jdk/rev/89f6aa26fd6c.

      This doesn't appear to be a regression, since that code path is only taken for synthetic methods. Synthetic methods aren't visible to annotation processors, and their parameter names don't end up in bytecode, so I don't think it's possible to observe the incorrect names.

            cushon Liam Miller-Cushon
            cushon Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: