ListBuffer could reuse List.nil() as the sentinel element

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b69
    • Verified

      The com.sun.tools.javac.util.ListBuffer uses a newly created List element as a sentinel element (and when an element is appended to the LB, it is set to the sentinel element and a new sentinel element is created). Maybe it could reuse List.nil()? That could save some memory while compiling.

      This issue is based on NetBeans bug:
      http://netbeans.org/bugzilla/show_bug.cgi?id=223094

            Assignee:
            Jan Lahoda
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: