<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hi,<br>
<br>
String is also an Identity class and its value could distinguish
between the cases. (Both strings can be very short).<br>
<br>
About java.lang.Object as a lock, the pervasiveness of `new
Object()` for locks resulted in giving it special dispensation in as
a supertype of value objects. Trying to change its existing uses was
determined to be infeasible.<br>
<br>
Regards, Roger<br>
<br>
<br>
<div class="moz-cite-prefix">On 1/25/26 11:17 AM, Chen Liang wrote:<br>
</div>
<blockquote type="cite" cite="mid:CH3PR10MB7677508B96BAE1976A8161D7A292A@CH3PR10MB7677.namprd10.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Checked this and noted this Lock is used by both lock and
shutdownLock - this makes the Lock class less informative to me.</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Maybe we should replace one of the locks with Object, or add a
new class to distinguish these two locks?</div>
<br>
<p style="font-family:Calibri;font-size:10pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
Confidential- Oracle Internal<br>
</p>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b>
core-libs-dev <a class="moz-txt-link-rfc2396E" href="mailto:core-libs-dev-retn@openjdk.org"><core-libs-dev-retn@openjdk.org></a> on behalf
of Eirik Bjørsnøs <a class="moz-txt-link-rfc2396E" href="mailto:eirbjo@gmail.com"><eirbjo@gmail.com></a><br>
<b>Sent:</b> Wednesday, January 21, 2026 12:28 AM<br>
<b>To:</b> David Holmes <a class="moz-txt-link-rfc2396E" href="mailto:david.holmes@oracle.com"><david.holmes@oracle.com></a><br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:core-libs-dev@openjdk.org">core-libs-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:core-libs-dev@openjdk.org"><core-libs-dev@openjdk.org></a><br>
<b>Subject:</b> Re: RFD: Replace class java.lang.Shutdown.Lock
with Object?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">On Wed, Jan 21, 2026 at 6:38 AM David Holmes
<<a href="mailto:david.holmes@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">david.holmes@oracle.com</a>>
wrote:</div>
<div class="x_gmail_quote x_gmail_quote_container">
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
No I suppose not. Though I'm not sure trimming the class
will make any <br>
observable/practical difference in the normal case.<br>
</blockquote>
<div><br>
</div>
<div>Thanks! I agree trimming these two classes (of ~428
loaded at startup) alone has limited value. But there are
other berries to pick and the cumulative impact may have
an observable effect on startup. Two berries feed no one,
with a handful we can make a delicious jam :)</div>
<div><br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
So effectively this is like declaring a single global
class that all <br>
"new Object()'s" would be instances of.<br>
<br>
So using new Object() will not be a problem.<br>
</blockquote>
<div><br>
</div>
<div>Thanks for the Valhalla reference, interesting to see
how "new Object()" can be redefined like this.</div>
<div><br>
</div>
<div>Eirik.</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>