Use Queue in place of ArrayList when need to remove first element

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 12
    • Affects Version/s: None
    • Component/s: tools
    • b03

      There are couple of places where ArrayList is used a FIFO structure.
      Using ArrayDeque would be more efficient.

      src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java
          private final Map<List<String>, List<ReusableContext>> options2Contexts;
      (value type is in fact ArrayList)

      src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
              Map<ClassSymbol, ArrayList<RewritingContext>> Q = new HashMap<>();

            Assignee:
            Ivan Gerasimov
            Reporter:
            Ivan Gerasimov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: