[8u] RFR 8260349: Cannot programmatically retrieve Metaspace max set via JAVA_TOOL_OPTIONS

Sergey Chernyshev serge.chernyshev at bell-sw.com
Mon Feb 15 11:07:18 UTC 2021


Hello,

I'd like to propose an 8u backport of JDK-8260349.

Original bug: https://bugs.openjdk.java.net/browse/JDK-8260349
Original patch: https://git.openjdk.java.net/jdk/commit/b6a73673
8u webrev: http://cr.openjdk.java.net/~alexsch/sercher/8260349.8u/webrev.00/

The patch doesn't apply cleanly. The following changes were made

- updated copyright text in memoryPool.cpp.
- source paths unshuffled

In the newly added test source (MaxMetaspaceSizeEnvVarTest.java),
compared to 11u backported version [1]:

- updated imported package names of ProcessTools, OutputAnalyzer
- removed JDK_JAVA_OPTIONS env variable which is @since 9
- .orElseThrow() is @since 10, replaced with .orElseThrow(exceptionSupplier)
- added import java.util.NoSuchElementException as required by
.orElseThrow()

The test passes with the patch and fails otherwise.
Run :hotspot tests, no regressions observed.

Thanks,

Sergey


[1] http://hg.openjdk.java.net/jdk-updates/jdk11u-dev/rev/5c8adc05d277

-- 
Best regards,
Sergey Chernyshev
Bellsoft LLC




More information about the jdk8u-dev mailing list