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
{{ message }}
Repository navigation
Warning "Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger" #16
I see this error in the Travis CI builds, but not in local builds.
mockito/mockito-cglib#1 seems like it's calling out use of an older mockito, but when updating to the last Java 6-supporting v2.x (v2.28.2), it produces a similar error: WARNING: Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger
With the update to Mockito 2.28.2 in commit 15e3fdc, going to retitle this.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger (file:/home/travis/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/2.28.2/91110215a8cb9b77a46e045ee758f77d79167cc0/mockito-core-2.28.2.jar) to field java.io.StringReader.str
WARNING: Please consider reporting this to the maintainers of org.mockito.internal.util.reflection.AccessibilityChanger
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
changed the title [-]Warning "Illegal reflective access by org.mockito.cglib.core.ReflectUtil$2"[/-][+]Warning "Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger"[/+]on Sep 6, 2019
With --invalid-access=deny, I get the following failures:
Gradle suite > Gradle test > com.github.fge.jackson.JsonNodeReaderTest.readerIsClosedOnRead FAILED
java.lang.NullPointerException at JsonNodeReaderTest.java:66
Gradle suite > Gradle test > com.github.fge.jackson.JsonNodeReaderTest.streamIsClosedOnRead FAILED
com.fasterxml.jackson.core.JsonParseException at JsonNodeReaderTest.java:55
Activity
Capstan commentedon Sep 6, 2019
With the update to Mockito 2.28.2 in commit 15e3fdc, going to retitle this.
[-]Warning "Illegal reflective access by org.mockito.cglib.core.ReflectUtil$2"[/-][+]Warning "Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger"[/+]Capstan commentedon Sep 6, 2019
mockito/mockito#1325 suggests that we have some improper uses of
spyonfinalclasses.Capstan commentedon Sep 6, 2019
With
--invalid-access=deny, I get the following failures:Mockito.spy cannot work on final objects.
Mockito.spy cannot work on final objects.