1

So I have crated an application with netty and it works fine, but it gives me debug messages that look like this:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.PlatformDependent0 
(file:/C:/Users/******/.m2/repository/io/netty/netty-all/5.0.0.Alpha2/netty-all-5.0.0.Alpha2.jar) to 
field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of 
io.netty.util.internal.PlatformDependent0
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
Juni 20, 2020 9:42:21 NACHM. io.netty.util.internal.PlatformDependent <clinit>
INFORMATION: Your platform does not provide complete low-level API for accessing direct buffers 
reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system 
unstability.

Im using netty-all on version 5.0.0.Alpha2 and I just want to disable those messages.

F4LS3
  • 151
  • 2
  • 11
  • 1
    Does this answer your question? [How to hide warning "Illegal reflective access" in java 9 without JVM argument?](https://stackoverflow.com/questions/46454995/how-to-hide-warning-illegal-reflective-access-in-java-9-without-jvm-argument) – Arnaud Claudel Jun 20 '20 at 19:49
  • It did made the most warnings disappear but there is still one: INFORMATION: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system unstability. – F4LS3 Jun 20 '20 at 19:53

1 Answers1

-1

I found out that Logger.getLogger("io.netty").setLevel(Level.OFF); does the trick and disables the debug/log messages.

F4LS3
  • 151
  • 2
  • 11