On Wed, 21 Dec 2022 11:03:08 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:
> `FontConfiguration.split` uses legacy synchronized `Vector` class. But > actually there is no need to use it, because input arguments are known at > compile time. Instead of split usages we can just create String[] array with > filled values directly. src/java.desktop/share/classes/sun/awt/FontConfiguration.java line 856: > 854: > 855: protected String[] split(String sequence) { > 856: Vector<String> v = splitSequence(sequence); Can `splitSequence` be replaced with `sequence.split(",")`. The created vector is used only to convert it to array. Using `split` returns the array. https://github.com/openjdk/jdk/blob/7170385dd8028ad8c2c84b619bee0ade3af3ff09/src/java.desktop/share/classes/sun/awt/FontConfiguration.java#L2118 ------------- PR: https://git.openjdk.org/jdk/pull/11754