From 4d1cf80d498119a25fa2da4bd3c8c31e5f366628 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Tue, 12 May 2020 10:15:09 -0600 Subject: [PATCH] Reduce JPMS warnings (#909) When deserializing some JSON-RPC requests jackson instantiates OptionalLong in a way JPMS doesn't like. Suppress that warning. Fixes #798 Signed-off-by: Danno Ferrin --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index f73469b87b..488fa325f7 100644 --- a/build.gradle +++ b/build.gradle @@ -462,14 +462,18 @@ apply plugin: 'application' mainClassName = 'org.hyperledger.besu.Besu' applicationDefaultJvmArgs = [ '-Dvertx.disableFileCPResolving=true', + // BESU_HOME is replaced by a doFirst block in the run task. '-Dbesu.home=BESU_HOME', // We shutdown log4j ourselves, as otherwise this shutdown hook runs before our own and whatever // happens during shutdown is not logged. '-Dlog4j.shutdownHookEnabled=false', + // Suppress Java JPMS warnings. Document the reason for each suppression. // Bouncy Castle needs access to sun.security.provider, which is not open by default. - // This suppresses an illegal access warning. '--add-opens', - 'java.base/sun.security.provider=ALL-UNNAMED' + 'java.base/sun.security.provider=ALL-UNNAMED', + // Jackson likes to access java.util.OptionalLong's constructor + '--add-opens', + 'java.util/sun.security.provider=ALL-UNNAMED' ] run {