Bug#1011543: libobject-cloner-java: FTBFS with OpenJDK 17 due to an illegal reflective access during the tests
Emmanuel Bourg
ebourg at apache.org
Tue May 24 20:34:41 BST 2022
Source: libobject-cloner-java
Version: 0.2~git95dba2c-2
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17
libobject-cloner-java fails to builds with OpenJDK 17, a test case makes
an illegal reflective access and triggers an error:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.kamranzafar.commons.cloner.ObjectClonerTest
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.034 s <<< FAILURE! - in org.kamranzafar.commons.cloner.ObjectClonerTest
[ERROR] deepClone(org.kamranzafar.commons.cloner.ObjectClonerTest) Time elapsed: 0.009 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make field private final byte[] java.lang.String.value accessible: module java.base does not "opens java.lang" to unnamed module @4cfaf581
at org.kamranzafar.commons.cloner.ObjectClonerTest.deepClone(ObjectClonerTest.java:56)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ObjectClonerTest.deepClone:56 » InaccessibleObject Unable to make field privat...
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
This can be fixed by adding this parameter to debian/maven.properties:
argLine=--add-opens java.base/java.lang=ALL-UNNAMED
More information about the pkg-java-maintainers
mailing list