On Tue, 6 Feb 2024 18:43:09 GMT, Jim Laskey wrote:
>> Currently, add is returning intern(e) == null which will always be false.
>> The correct test is intern(e) == e , that is, true when element is newly
>> added.
>
> Jim Laskey has updated the pull request incrementally with one additional
>
On Mon, 5 Feb 2024 16:59:51 GMT, Jim Laskey wrote:
>> ok, `intern(e) == e` is sufficient.
>
> Created https://bugs.openjdk.org/browse/JDK-8325255
While `intern(e) == e` is (mostly) sufficient, it will return a false positive
when `add(e)` is called and `e` is already present in the map, the cor
Hello Core-Libs-Dev team,
may I ask you about your opinion about a tiny one-liner change in
AbstractQueuedSynchronizer, just as a suggestion how to make
ConditionObjects / Nodes even more garbage collector friendly?
Checked out
https://github.com/openjdk/jdk/blob/jdk-17%2B35/src/java.base/share/
Since I am abandoning this idea, could someone close my JBS ticket?
And please link this message in the core-libs-dev archives as the close
reason -- I fear the potential for misuse, as mentioned in previous emails
on this thread.
https://bugs.openjdk.org/browse/JDK-8324718
On Sun, Feb 11, 2024
On Sat, 27 Jan 2024 03:57:58 GMT, David Alayachew wrote:
> Adding a function to Objects in order to facilitate equality checking and
> enhance readability. You simply specify the 2 objects that you want to check
> for equality, and then provide the functions which will be used to provide
> the
Hello,
Thank you for your response!
So, I had thought of that before posting this email, and mentally, I had
hand-waved away the concern by saying that there were plenty of situations
where equality would still be useful without hashing. And while I still
very much feel the same, the way you phra
How beneficial is it to extend equality method without appropriate hashing?
Specifically, given you are working in a domain specific world, e.g.
projection of Point3D into XY with equality semantics of equalsByXY, Java
does not know how to treat semantically equal objects as equal:
var foo = new