Integrated: 8298447: Unnecessary Vector usage in DocPrintJob implementations

Andrey Turbanov aturbanov at openjdk.org
Fri Jan 6 08:32:56 UTC 2023


On Mon, 5 Dec 2022 08:23:58 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> There are 3 implementations of javax.print.DocPrintJob in the JDK (It seems they were copy-pasted from each other):
> 1. PSStreamPrintJob
> 2. UnixPrintJob
> 3. Win32PrintJob
> 
> They have Vector fields 'jobListeners', 'attrListeners', 'listenedAttributeSets', but they are always accessed only under synchronized(this) blocks. It means we can safely replace them with ArrayList.
> 
> BTW. 'attrListeners' and 'listenedAttributeSets' seems unused.

This pull request has now been integrated.

Changeset: 0234f813
Author:    Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0234f813e6113fee133a2cab77566d1fcb191c8b
Stats:     24 lines in 3 files changed: 0 ins; 0 del; 24 mod

8298447: Unnecessary Vector usage in DocPrintJob implementations

Reviewed-by: serb

-------------

PR: https://git.openjdk.org/jdk/pull/11504



More information about the client-libs-dev mailing list