RFR: 8375351: Remove usage of AppContext from print implementation [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Jan 19 06:47:36 UTC 2026
On Sat, 17 Jan 2026 17:49:44 GMT, Phil Race <prr at openjdk.org> wrote:
>> Remove AppContext from javax.print
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>
> 8375351
src/java.desktop/share/classes/javax/print/PrintServiceLookup.java line 82:
> 80: */
> 81: private static Services getServices() {
> 82: return SERVICES;
Dont we need to implement singleton instance like this?
private static volatile Services SERVICES = null;
private static Services getServices() {
if (SERVICES== null) {
// Synchronized block for thread safety during first creation
synchronized (Services.class) {
if (SERVICES == null) {
SERVICES = new Services();
}
}
}
return SERVICES;
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29237#discussion_r2703419127
More information about the client-libs-dev
mailing list