Print数组使用Arrays.toString

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@75 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
ding.lid 2011-10-26 08:20:11 +00:00
parent 7c7d9b6ce1
commit 04f9378528
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ public class TelnetCodec extends TransportCodec {
if (message[message.length - 1] == '\b') { // Windows backspace echo
try {
boolean doublechar = message.length > 2 && message[message.length - 3] < 0; // double byte char
boolean doublechar = message.length >= 3 && message[message.length - 3] < 0; // double byte char
channel.send(new String(doublechar ? new byte[] {32, 32, 8, 8} : new byte[] {32, 8}, getCharset(channel).name()));
} catch (RemotingException e) {
throw new IOException(StringUtils.toString(e));
@ -103,7 +103,7 @@ public class TelnetCodec extends TransportCodec {
for (Object command : EXIT) {
if (isEquals(message, (byte[]) command)) {
if (logger.isInfoEnabled()) {
logger.info(new Exception("Close channel " + channel + " on exit command " + command));
logger.info(new Exception("Close channel " + channel + " on exit command: " + Arrays.toString((byte[])command)));
}
channel.close();
return null;