JDK-8352969 : G1: Improve testability of optional collections
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-26
  • Updated: 2025-09-23
  • Resolved: 2025-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b16Fixed
Related Reports
Relates :  
Description
JDK-8352508 (and probably in earlier issues as well) showed an issue with reproduceability of optional collections: there is no good way to force optional collections, making us rely on random testing.

This is bad.

Improve the situation; one suggestion has been to introduce a flag that always makes all old gen regions in the collection set part of optional evacuation, exercising this functionality.

As an example this functionality could be used to create a test for JDK-8352508 that verifies optional collections in that scenario too.
Comments
Changeset: e172e6a4 Branch: master Author: Guanqiang Han <ghan@openjdk.org> Committer: Albert Mingkun Yang <ayang@openjdk.org> Date: 2025-09-11 15:08:42 +0000 URL: https://git.openjdk.org/jdk/commit/e172e6a4e37cf06afee662625a01193f5528a2b1
11-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26880 Date: 2025-08-21 10:10:23 +0000
21-08-2025