You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run a test that uses sameBeanAs() on Java 17 - using JUnit 5- fails with a InaccessibleObjectException
java.lang.reflect.InaccessibleObjectException: Unable to make field private static final long java.time.Duration.serialVersionUID accessible: module java.base does not "opens java.time" to unnamed module @527740a2
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnFields(CyclicReferenceDetector.java:72)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnObject(CyclicReferenceDetector.java:119)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnFields(CyclicReferenceDetector.java:78)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnObject(CyclicReferenceDetector.java:119)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnFields(CyclicReferenceDetector.java:78)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnObject(CyclicReferenceDetector.java:119)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnFields(CyclicReferenceDetector.java:78)
at com.shazam.shazamcrest.CyclicReferenceDetector.detectCircularReferenceOnObject(CyclicReferenceDetector.java:119)
at com.shazam.shazamcrest.CyclicReferenceDetector.getClassesWithCircularReferences(CyclicReferenceDetector.java:40)
at com.shazam.shazamcrest.matcher.DiagnosingCustomisableMatcher.matches(DiagnosingCustomisableMatcher.java:64)
at org.hamcrest.DiagnosingMatcher.matches(DiagnosingMatcher.java:12)
at org.hamcrest.core.Is.matches(Is.java:25)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:10)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at com.emc.symmwin.scheduler.db.controller.SchedulerDataFacadeIT.whenFetchTaskRun_givenPresent_shouldWork(SchedulerDataFacadeIT.java:343)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Looks like shazamcrest should not be looking at static fields and honour the Java module access specifiers
The text was updated successfully, but these errors were encountered:
Trying to run a test that uses sameBeanAs() on Java 17 - using JUnit 5- fails with a InaccessibleObjectException
Looks like shazamcrest should not be looking at static fields and honour the Java module access specifiers
The text was updated successfully, but these errors were encountered: