Remove unnecessary contructor and exception in NioEchoServer
Reviewers: notifygd, Andrew Choi Jakob Homan, Chia-Ping Tsai
@@ -60,11 +60,7 @@ public class NioEchoServer extends Thread {
public enum MetricType {
TOTAL, RATE, AVG, MAX;
- private final String metricNameSuffix;
-
- private MetricType() {
- metricNameSuffix = "-" + name().toLowerCase(Locale.ROOT);
- }
+ private final String metricNameSuffix = "-" + name().toLowerCase(Locale.ROOT);
public String metricNameSuffix() {
return metricNameSuffix;
@@ -316,7 +312,7 @@ public class NioEchoServer extends Thread {
}
private class AcceptorThread extends Thread {
- public AcceptorThread() throws IOException {
+ public AcceptorThread() {
setName("acceptor");
}
@Override
