Hi all, During recent debugging looking at JDK-8148334 [1], I ran across `TextLine.createComponentsOnRun(...)`, which seems to be a bit too eager to expand the component array, leading to the following steps:
1. `TextLine.fastCreateTextLine(...)` allocates a one-element component array, passing it to `createComponentsOnRun(...)` 2. `createComponentsOnRun(...)` adds a single element to the array, but expands the array (i.e. creates a new larger array) to fit more (non-existent) elements, returning the larger array 3. `TextLine.fastCreateTextLine(...)` detects the larger-than-necessary array, and trims it back down to size (i.e. creates a new smaller array) The fix is simple: check if `numComponents > components.length` before expanding the array, instead of the current check of `numComponents >= components.length`. Could somebody file a bug in the issue tracker, so that I can submit a PR to fix this? I do not have access to create issues. Thanks! Daniel [1] https://bugs.openjdk.org/browse/JDK-8148334