Jason Tedor
d0bef36d24
Do not log on explicit no unsafe
Motivation: When Netty components are initialized, Netty attempts to determine if it has access to unsafe. If Netty is not able to access unsafe (because of security permissions, or because the JVM was started with an explicit flag to tell Netty to not look for unsafe), Netty logs an info-level message that looks like a warning: 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. This log message can appear in applications that depend on Netty for networking, and this log message can be scary to end-users of such platforms. This log message should not be emitted if the application was started with an explicit flag telling Netty to not look for unsafe. Modifications: This commit refactors the unsafe detection logic to expose whether or not the JVM was started with a flag telling Netty to not look for unsafe. With this exposed information, the log message on unsafe being unavailable can be modified to not be emitted when Netty is explicitly told to not look for unsafe. Result: No log message is produced when unsafe is unavailable because Netty was told to not look for it.
Netty Project
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.
Links
How to build
For the detailed information about building and developing Netty, please visit the developer guide. This page only gives very basic information.
You require the following to build Netty:
- Latest stable Oracle JDK 7
- Latest stable Apache Maven
- If you are on Linux, you need additional development packages installed on your system, because you'll build the native transport.
Note that this is build-time requirement. JDK 5 (for 3.x) or 6 (for 4.0+) is enough to run your Netty-based application.
Branches to look
Development of all versions takes place in each branch whose name is identical to <majorVersion>.<minorVersion>
. For example, the development of 3.9 and 4.0 resides in the branch '3.9' and the branch '4.0' respectively.
Description
Languages
Java
99.8%
Shell
0.1%