RFR: 8357913: Add `@Stable` to BigInteger and BigDecimal [v3]

Shaojin Wen swen at openjdk.org
Wed Jun 4 01:07:29 UTC 2025


On Mon, 2 Jun 2025 18:23:25 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   BigInteger::mag remove Stable
>
> A general comment with respect to `@Stable` is that it asserts the field/elements will only change at most once (e.g., an array cannot expand, an element can't be written to more than once (unless the contents is "equivalent")). It is dangerous not to uphold the invariants imposed by `@Stable`. So, triple-checking for potential updates (even via reflection) must be done.

Thank you @minborg  and @ExE-Boss  for your review. I checked again that the static fields marked with @Stable have not been changed after initialization.

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

PR Comment: https://git.openjdk.org/jdk/pull/25437#issuecomment-2937928480


More information about the core-libs-dev mailing list