RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v9]
Adam Sotona
asotona at openjdk.org
Thu Jun 8 13:26:55 UTC 2023
On Thu, 8 Jun 2023 11:26:39 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> Classfile context object and multi-state options have been discussed at https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html
>> This patch implements the proposed changes in Classfile API and fixes all affected code across JDK sources and tests.
>>
>> Please review.
>>
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> ClassHierarchyResolver::ofSystem is now thread-unsafe
Unfortunately thread-unsafe context makes sharing of it in tests executed in parallel a nightmare.
I can fix our Corpus tests and hope the race condition won't raise also somewhere else later.
However how to explain this limitation to users?
I suggest to make it always thread-safe (as the context is primary expected to be shared in multi-threaded environment) and users may make it faster in specific cases by providing non-synchronized map.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14180#issuecomment-1582576426
More information about the core-libs-dev
mailing list