From 480f3ad5a1aa492e6c3afa3b290cd62925a39986 Mon Sep 17 00:00:00 2001 From: Phil Adams Date: Tue, 22 Mar 2022 21:13:59 -0500 Subject: [PATCH] fix: allow java16+ as JRE This commit includes a small change to the AbstractToken class to avoid an InaccessibleObjectException when running code using a Java 16 (or later) JRE. --- pom.xml | 34 ++++++++++++------- .../sdk/core/security/AbstractToken.java | 2 +- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index e06097c40..514f5c297 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,4 @@ - + 4.0.0 com.ibm.cloud sdk-core @@ -15,7 +14,7 @@ 3.0.0-M5 3.1.2 8.41 - 0.8.3 + 0.8.7 3.8.0 4.9.1 30.1.1-jre @@ -24,7 +23,7 @@ 2.7 3.8.1 2.2.7 - 3.11.2 + 3.12.4 2.0.9 3.0.0-M1 1.6.8 @@ -32,9 +31,12 @@ 4.13.2 + + + - + Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0.txt @@ -65,8 +67,7 @@ - - + @@ -249,8 +250,6 @@ true ${sonar.jacoco.reportPath} - - surefireArgLine @@ -276,6 +275,7 @@ false 1 + @{argLine} ${surefireJvmArgs} @@ -319,7 +319,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - ${nexus-staging-plugin-version} + ${nexus-staging-plugin-version} true ossrh @@ -331,7 +331,7 @@ org.apache.maven.plugins maven-gpg-plugin - ${maven-gpg-plugin-version} + ${maven-gpg-plugin-version} sign-artifacts @@ -357,6 +357,16 @@ ${env.GPG_PASSPHRASE} + + java16+ + + [16,) + + + + --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.logging/java.util.logging=ALL-UNNAMED + + - + \ No newline at end of file diff --git a/src/main/java/com/ibm/cloud/sdk/core/security/AbstractToken.java b/src/main/java/com/ibm/cloud/sdk/core/security/AbstractToken.java index 553339a82..b70d89f8f 100644 --- a/src/main/java/com/ibm/cloud/sdk/core/security/AbstractToken.java +++ b/src/main/java/com/ibm/cloud/sdk/core/security/AbstractToken.java @@ -23,7 +23,7 @@ public abstract class AbstractToken { // This field will be used to indicate that the most recent interaction with the token server // resulted in an error. - private Throwable exception; + private transient Throwable exception; public AbstractToken() { }