[jdk21u-dev] RFR: 8368328: CompactNumberFormat.clone does not produce independent instances
Roland Mesde
duke at openjdk.org
Wed Nov 26 18:09:55 UTC 2025
On Tue, 11 Nov 2025 18:04:45 GMT, Roland Mesde <duke at openjdk.org> wrote:
> Backporting JDK-8368328: CompactNumberFormat.clone does not produce independent instances. Fixes clone method logic and adds a new test. Ran GHA Sanity Checks (passed) and new test (passed). Patch is clean.
Risk Level: LOW-MEDIUM
Mitigation Factors:
- Targeted fix - Only affects clone() method behavior
- Defensive change - Improves thread safety without breaking existing functionality
- Well-defined scope - Clear distinction between mutable/immutable objects
- Backward compatible - No API signature changes
- Addresses real bug - Fixes documented concurrency issues
Risk Factors:
- Memory impact - Additional object allocation during cloning
- Performance overhead - Cloning operations now more expensive
- Behavioral change - Applications relying on previous behavior may break
- Testing coverage - Older Java applications may have test scenarios dependent on behavior
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2462#issuecomment-3582600534
More information about the jdk-updates-dev
mailing list