<div dir="ltr"><div dir="ltr">On Tue, Jan 27, 2026 at 12:05 AM Roger Riggs <<a href="mailto:roger.riggs@oracle.com">roger.riggs@oracle.com</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
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></div></blockquote><div><br></div><div>Great minds are pulling this thread in interesting directions, which is fine! I may go ahead file a PR to focus on the specific small changes initially suggested. Then any broader discussions can continue here.</div><div><br></div><div>Was there ever any thoughts to add an API point for defining new montor objects, such as Object.newLock() or perhaps even something like Object.newLock(Class context, String tag)? </div><div><br></div><div>Perhaps this could:</div><div><br></div><div>a) Make the semantics/purpose of creating a new object more clear </div><div>b) Allow the JVM to return any object it wants</div><div>c) Allow monitor objects to be more informative</div><div><br></div><div>Cheers,</div><div>Eirik.</div></div></div>