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

[local-methods] Implementation member methods need better naming style

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-amber
    • Fix Version/s: repo-amber
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Given:

      public class X {

          public static void main(String args []) {
              void goo() {
              }
              void foo() {
              }
          }
      }

      Javac emits the representation methods as:

      private static void local$main$1(); and
      private static void local$main$0();

      See that the source names are lost in translation. This was OK for lambdas as they are anonymous blocks of code, but is a gratuitous loss of information that could make for better readability of javap out put (say)


        Attachments

          Activity

            People

            Assignee:
            sadayapalam Srikanth Adayapalam
            Reporter:
            sadayapalam Srikanth Adayapalam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: