<i18n dev> RFR: 8271603: Unnecessary Vector usage in java.desktop [v2]

Sergey Bylokhov serb at openjdk.java.net
Tue Aug 24 23:12:28 UTC 2021

On Tue, 24 Aug 2021 21:13:57 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

>> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to use `ArrayList` if a thread-safe implementation is not needed. In post-BiasedLocking times, this is gets worse, as every access is synchronized.
>> I checked only places where `Vector` was used as local variable.
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>   8271603: Unnecessary Vector usage in java.desktop
>   revert back to Enumeration
>   bring back default values

src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java line 244:

> 242:         }
> 243: 
> 244:         return list.toArray(new Line.Info[0]);

I thought we already covered such changed under JDK-8269130, is there are any other missed cases? If yes then probably it will be good to extract such changes.


PR: https://git.openjdk.java.net/jdk/pull/4680

More information about the i18n-dev mailing list