【发布时间】:2020-06-21 04:15:38
【问题描述】:
所以我用 netty 创建了一个应用程序,它工作正常,但它给我的调试消息如下所示:
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.
我在 5.0.0.Alpha2 版本上使用 netty-all,我只想禁用这些消息。
【问题讨论】:
-
它确实使大多数警告消失了,但仍然有一个: 信息:您的平台没有提供完整的低级 API 来可靠地访问直接缓冲区。除非明确要求,否则始终首选堆缓冲区以避免潜在的系统不稳定。