Javac generates a block tree node for empty statement in a class

XMLWordPrintable

    • generic
    • generic

      If you pass the following piece code through javac
      public class Test {
      ;
      {

      a block tree node is generated by javac for the semi-colon inside the class Test. The fields pos and endpos of tree node are set to -1. Trying to generate the source code based on the tree results in the following code
      public class Test {
      {
      }
      {

      This affects the tools depending on javac for source modelling. See a related bug 6357517 which is filed against Java Studio Creator

            Assignee:
            Unassigned
            Reporter:
            Devananda Jayaraman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: