From ef5b454a002eb0aa7605da0962266905641e3d20 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Mon, 14 Jan 2019 14:20:57 +0800 Subject: [PATCH] Use camel-case in NioEventLoop (#8713) Motivation: Java uses camel-case by convention. Modification: Consistently use camel-case. Result: More consistent code styling. --- .../main/java/io/netty/channel/nio/NioEventLoop.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/nio/NioEventLoop.java b/transport/src/main/java/io/netty/channel/nio/NioEventLoop.java index 16695c8f7e..100065f350 100644 --- a/transport/src/main/java/io/netty/channel/nio/NioEventLoop.java +++ b/transport/src/main/java/io/netty/channel/nio/NioEventLoop.java @@ -59,7 +59,7 @@ public final class NioEventLoop extends SingleThreadEventLoop { private static final int CLEANUP_INTERVAL = 256; // XXX Hard-coded value, but won't need customization. - private static final boolean DISABLE_KEYSET_OPTIMIZATION = + private static final boolean DISABLE_KEY_SET_OPTIMIZATION = SystemPropertyUtil.getBoolean("io.netty.noKeySetOptimization", false); private static final int MIN_PREMATURE_SELECTOR_RETURNS = 3; @@ -79,8 +79,8 @@ public final class NioEventLoop extends SingleThreadEventLoop { // - https://github.com/netty/netty/issues/203 static { final String key = "sun.nio.ch.bugLevel"; - final String buglevel = SystemPropertyUtil.get(key); - if (buglevel == null) { + final String bugLevel = SystemPropertyUtil.get(key); + if (bugLevel == null) { try { AccessController.doPrivileged(new PrivilegedAction() { @Override @@ -102,7 +102,7 @@ public final class NioEventLoop extends SingleThreadEventLoop { SELECTOR_AUTO_REBUILD_THRESHOLD = selectorAutoRebuildThreshold; if (logger.isDebugEnabled()) { - logger.debug("-Dio.netty.noKeySetOptimization: {}", DISABLE_KEYSET_OPTIMIZATION); + logger.debug("-Dio.netty.noKeySetOptimization: {}", DISABLE_KEY_SET_OPTIMIZATION); logger.debug("-Dio.netty.selectorAutoRebuildThreshold: {}", SELECTOR_AUTO_REBUILD_THRESHOLD); } } @@ -169,7 +169,7 @@ public final class NioEventLoop extends SingleThreadEventLoop { throw new ChannelException("failed to open a new selector", e); } - if (DISABLE_KEYSET_OPTIMIZATION) { + if (DISABLE_KEY_SET_OPTIMIZATION) { return new SelectorTuple(unwrappedSelector); }