testcontainers-java
testcontainers-java copied to clipboard
warnings about illegal reflective access
When running my tests with Oracle Java 10 I get warnings like this:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.testcontainers.shaded.io.netty.util.internal.ReflectionUtil (file:/home/capitol/.gradle/caches/modules-2/files-2.1/org.testcontainers/testcontainers/1.7.1/3a8d198f3b7cafa3c08d8edee7f4f370ccee1526/testcontainers-1.7.1.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of org.testcontainers.shaded.io.netty.util.internal.ReflectionUtil
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
This should happen with Java 9 as well (it happens in our CI build). Since this warning comes from Netty, I think there's not much we can do about it ATM.
According to this issue https://github.com/netty/netty/pull/7650 it's fixed in netty 4.1.21Final, but that dependency comes from the docker-java project. I will go and open a issue there also.
Reported it here: https://github.com/docker-java/docker-java/issues/1037
Thanks for your investment, as I see you've also fixed it over at docker-java in https://github.com/docker-java/docker-java/pull/1038. So we can simply update our dependency to rc-4 once it's released it seems?
Yes, that should fix this warning, but another one might pop up. And it might be nice to wait for a full release instead of using a release candidate.
AFAIK we are already using rc3 now (and there was a reason for it), so it might be okay in this case.