On Sat, 17 Jan 2026 17:49:44 GMT, Phil Race <[email protected]> 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

Reply via email to