Skip to content

Commit

Permalink
use LOG instead of printStackTrace
Browse files Browse the repository at this point in the history
  • Loading branch information
ffang committed Dec 4, 2018
1 parent 4835e32 commit 4ed46c6
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -175,7 +175,7 @@ public String getLocalAddr() {
try {
return new URL(channel.getUrl()).getHost();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getLocalAddr error", e);
return null;
}
}
Expand All @@ -186,7 +186,7 @@ public String getLocalName() {
try {
return new URL(channel.getUrl()).getHost();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getLocalName error", e);
return null;
}
}
Expand All @@ -197,7 +197,7 @@ public int getLocalPort() {
try {
return new URL(channel.getUrl()).getPort();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getLocalPort error", e);
return 0;
}
}
Expand Down Expand Up @@ -248,7 +248,7 @@ public String getProtocol() {
try {
return new URL(channel.getUrl()).getProtocol();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getProtocol error", e);
return null;
}
}
Expand All @@ -271,7 +271,7 @@ public String getRemoteAddr() {
try {
return new URL(channel.getPeerAddress().toString()).getHost();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getRemoteAddr error", e);
return null;
}
}
Expand All @@ -282,7 +282,7 @@ public String getRemoteHost() {
try {
return new URL(channel.getPeerAddress().toString()).getHost();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getRemoteHost error", e);
return null;
}
}
Expand All @@ -293,7 +293,7 @@ public int getRemotePort() {
try {
return new URL(channel.getPeerAddress().toString()).getPort();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getRemotePort error", e);
return 0;
}
}
Expand All @@ -310,7 +310,7 @@ public String getScheme() {
try {
return new URL(channel.getUrl()).getProtocol();
} catch (MalformedURLException e) {
e.printStackTrace();
LOG.log(Level.FINE, "getScheme error", e);
return null;
}
}
Expand Down

0 comments on commit 4ed46c6

Please sign in to comment.