IBM / java-sdk-core

Core functionality required by Java code generated by the IBM Cloud OpenAPI SDK Generator (openapi-sdkgen)
https://ibm.github.io/java-sdk-core/
Apache License 2.0
20 stars 21 forks source link

fix: allow java16+ as JRE #171

Closed padamstx closed 2 years ago

padamstx commented 2 years ago

This commit includes a small change to the AbstractToken class to avoid an InaccessibleObjectException when running code using a Java 17 JRE. In addition, the pom.xml was updated to make it easy to build/test with a Java 17 JDK... just add "-P java17" to the mvn command line.

Note: although we don't yet include a java17-based build in Travis, I've tested locally and with the changes in this PR, I'm able to build and test the project cleanly by running mvn clean install -P java17 while using the Oracle Java 17 JDK. Unfortunately, I have to use the --add-opens JVM option when running unit tests due to InaccessibleObjectException's that occur in some of our dependencies (mostly powermock, etc.).

ibm-devx-sdk commented 2 years ago

:tada: This PR is included in version 9.16.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

dominicfeliton commented 2 years ago

Thank you! This fixed an error I reported from a few months ago.