Modified to lower camel case (#2945)
authorhuazhongming <crazyhzm@gmail.com>
Wed, 12 Dec 2018 06:23:19 +0000 (14:23 +0800)
committerIan Luo <ian.luo@gmail.com>
Wed, 12 Dec 2018 06:23:19 +0000 (14:23 +0800)
dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/LogTelnetHandler.java
dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/logging/MessageFormatter.java

index 121b9d3..bdbdebf 100644 (file)
@@ -52,7 +52,7 @@ public class LogTelnetHandler implements TelnetHandler {
             if (!StringUtils.isInteger(str[0])) {
                 LoggerFactory.setLevel(Level.valueOf(message.toUpperCase()));
             } else {
-                int SHOW_LOG_LENGTH = Integer.parseInt(str[0]);
+                int showLogLength = Integer.parseInt(str[0]);
 
                 if (file != null && file.exists()) {
                     try {
@@ -62,12 +62,12 @@ public class LogTelnetHandler implements TelnetHandler {
                             try {
                                 size = filechannel.size();
                                 ByteBuffer bb;
-                                if (size <= SHOW_LOG_LENGTH) {
+                                if (size <= showLogLength) {
                                     bb = ByteBuffer.allocate((int) size);
                                     filechannel.read(bb, 0);
                                 } else {
-                                    int pos = (int) (size - SHOW_LOG_LENGTH);
-                                    bb = ByteBuffer.allocate(SHOW_LOG_LENGTH);
+                                    int pos = (int) (size - showLogLength);
+                                    bb = ByteBuffer.allocate(showLogLength);
                                     filechannel.read(bb, pos);
                                 }
                                 bb.flip();
index a138bcf..f860875 100644 (file)
@@ -175,8 +175,8 @@ final class MessageFormatter {
         int j;
         StringBuffer sbuf = new StringBuffer(messagePattern.length() + 50);
 
-        int L;
-        for (L = 0; L < argArray.length; L++) {
+        int l;
+        for (l = 0; l < argArray.length; l++) {
 
             j = messagePattern.indexOf(DELIM_STR, i);
 
@@ -194,7 +194,7 @@ final class MessageFormatter {
             } else {
                 if (isEscapedDelimeter(messagePattern, j)) {
                     if (!isDoubleEscaped(messagePattern, j)) {
-                        L--; // DELIM_START was escaped, thus should not be incremented
+                        l--; // DELIM_START was escaped, thus should not be incremented
                         sbuf.append(messagePattern.substring(i, j - 1));
                         sbuf.append(DELIM_START);
                         i = j + 1;
@@ -203,20 +203,20 @@ final class MessageFormatter {
                         // itself escaped: "abc x:\\{}"
                         // we have to consume one backward slash
                         sbuf.append(messagePattern.substring(i, j - 1));
-                        deeplyAppendParameter(sbuf, argArray[L], new HashMap<Object[], Void>());
+                        deeplyAppendParameter(sbuf, argArray[l], new HashMap<Object[], Void>());
                         i = j + 2;
                     }
                 } else {
                     // normal case
                     sbuf.append(messagePattern.substring(i, j));
-                    deeplyAppendParameter(sbuf, argArray[L], new HashMap<Object[], Void>());
+                    deeplyAppendParameter(sbuf, argArray[l], new HashMap<Object[], Void>());
                     i = j + 2;
                 }
             }
         }
         // append the characters following the last {} pair.
         sbuf.append(messagePattern.substring(i, messagePattern.length()));
-        if (L < argArray.length - 1) {
+        if (l < argArray.length - 1) {
             return new FormattingTuple(sbuf.toString(), argArray, throwableCandidate);
         } else {
             return new FormattingTuple(sbuf.toString(), argArray, null);