RFR: 8357913: Add `@Stable` to BigInteger and BigDecimal
Per Minborg
pminborg at openjdk.org
Wed May 28 11:45:52 UTC 2025
On Sun, 25 May 2025 22:35:56 GMT, Shaojin Wen <swen at openjdk.org> wrote:
> Some static final arrays of BigInteger and BigDecimal are stable and immutable. We should add `@Stable` to give the optimizer more information
src/java.base/share/classes/java/math/BigDecimal.java line 4317:
> 4315: };
> 4316:
> 4317: @Stable
This one is a bit dangerous as it can be reassigned. I think we should not mark this array @Stable unless we have analysed in detail the implications thereof.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25437#discussion_r2111639918
More information about the core-libs-dev
mailing list