Skip to content

Commit

Permalink
Modified to lower camel case (#2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyHZM authored and beiwei30 committed Dec 12, 2018
1 parent 61eff59 commit 6c9f74c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String telnet(Channel channel, String message) {
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 {
Expand All @@ -62,12 +62,12 @@ public String telnet(Channel channel, String message) {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ static FormattingTuple arrayFormat(final String messagePattern,
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);

Expand All @@ -194,7 +194,7 @@ static FormattingTuple arrayFormat(final String messagePattern,
} 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;
Expand All @@ -203,20 +203,20 @@ static FormattingTuple arrayFormat(final String messagePattern,
// 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);
Expand Down

0 comments on commit 6c9f74c

Please sign in to comment.