RFR: 8364544: Extract the checks of AtomicXxxFieldUpdater into a common place [v4]
Steve Armstrong
duke at openjdk.org
Tue Nov 25 12:04:18 UTC 2025
On Tue, 25 Nov 2025 10:30:26 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> Steve Armstrong has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix try-catch block to not wrap IllegalArgumentException
>>
>> The validation exceptions should be thrown directly to the caller,
>> not wrapped in RuntimeException. Only the field lookup and access
>> checking code should be in the try-catch block.
>
> (Adding this comment here as well as the linked JBS issue)
>
> Personally I think this isn't worth the effort—there's little-to-no updates to these classes/APIs and there's no clear benefit in terms of safety and/or performance.
>
> My preference here would be to move to deprecate these classes and make sure that it is clearly documented that VarHandle is the intended successor API.
>
> Tagging @DougLea and Dr Deprecator @stuart-marks for their input.
Thankyou @viktorklang-ora for letting me know your thoughts on this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28464#issuecomment-3575306830
More information about the core-libs-dev
mailing list