mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
Avoid loading custom empty Lock classes
This commit is contained in:
parent
932556026d
commit
4f17d3fa88
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,11 +55,10 @@ class Shutdown {
|
||||
private static int currentRunningHook = -1;
|
||||
|
||||
/* The preceding static fields are protected by this lock */
|
||||
private static class Lock { };
|
||||
private static Object lock = new Lock();
|
||||
private static final Object lock = new Object();
|
||||
|
||||
/* Lock object for the native halt method */
|
||||
private static Object haltLock = new Lock();
|
||||
private static final Object haltLock = new Object();
|
||||
|
||||
/**
|
||||
* Add a new system shutdown hook. Checks the shutdown state and
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,8 +60,7 @@ public class ReferenceQueue<@jdk.internal.RequiresIdentity T> {
|
||||
private volatile Reference<? extends T> head;
|
||||
private long queueLength = 0;
|
||||
|
||||
private static class Lock { };
|
||||
private final Lock lock = new Lock();
|
||||
private final Object lock = new Object();
|
||||
|
||||
/**
|
||||
* Constructs a new reference-object queue.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user