JDK-8037539 : Inefficient implementation of Gen.setTypeAnnotationPositions
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2014-03-17
  • Updated: 2020-09-17
  • Resolved: 2020-09-17
Description
The implementation of setTypeAnnotationPositions will iterate over N type annotations N times, looking for a specific tree position.  This is O(N^2).  The implementation should use a hash table or similar structure to reduce running times to O(N).