I hit the strong encapsulation issue using the sys...
# kotest
d
I hit the strong encapsulation issue using the system extension
withEnvironment
on JDK 17.
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Map java.util.Collections$UnmodifiableMap.m accessible
at
SystemEnvironmentExtensions.kt:115
. I can get around the issue by adding
--add-opens java.base/java.util=ALL-UNNAMED
, but I'm wondering if there's a different path forward for this feature that doesn't require the workaround.?
s
Until the JDK offers some way of modifying the env vars at runtime, that is the only way to do it.
🙏 1