RFR: 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not thread safe

Alan Bateman alanb at openjdk.org
Tue Feb 21 14:50:28 UTC 2023


On Mon, 20 Feb 2023 22:26:21 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I would also be concerned about the guarantee of idempotency from the factory method - I hope its requirements in that area are clearly documented.

The spec for the getGenericXXX methods are "Return a" rather than "Return the" so there shouldn't be any expectation on identity. The question about idempotency might be worth checking into as the underlying factory for reflective generic type objects does interact with the defining class loader.

-------------

PR: https://git.openjdk.org/jdk/pull/12643


More information about the core-libs-dev mailing list