RFR: 8298447: Unnecessary Vector usage in DocPrintJob implementations

Sergey Bylokhov serb at openjdk.org
Fri Dec 9 06:50:41 UTC 2022


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.

looks fine.

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

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



More information about the client-libs-dev mailing list