Closed lafoletc closed 1 year ago
Are there any identity tests except against fundamental types (eg. INVALID
) in the existing code? Other than those there should be no expectation that ==
should be used over equals()
. That was always the case until you added the existing caching. Could be changed to use computeIfAbsent()
but this is not API for external use anyway.
You're welcome to put in a PR for this, although I cannot guarantee when or if there will be any further releases of this library - focus of our GStreamer work is under review as mentioned on the mailing list.
In Structure.setObject(), == is used instead of equals()
In Structure.setObject(), == is used instead of equals()
Well, that code is wrong then. It should use equals(). I missed that in reviewing the contribution. Both sides should be updated, Structure and GType.
Several threads can invoke simultaneously GType.valueOf(long) : several GType instances can be generated for the same long.
Test with gtype1 == gtype2 can fail
PS : GType.valueOf(String) need to be checked too