Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.

This commit is contained in:
Ilkka Seppala
2015-12-25 23:49:28 +02:00
parent 9fbb085985
commit cec9a99410
167 changed files with 1242 additions and 969 deletions

View File

@ -24,6 +24,9 @@ public class LoadBalancer {
servers.add(new Server("localhost", 8084, ++id));
}
/**
* Add new server
*/
public final void addServer(Server server) {
synchronized (servers) {
servers.add(server);
@ -39,6 +42,9 @@ public class LoadBalancer {
return lastServedId;
}
/**
* Handle request
*/
public void serverequest(Request request) {
if (lastServedId >= servers.size()) {
lastServedId = 0;

View File

@ -11,6 +11,9 @@ public class Server {
public final int port;
public final int id;
/**
* Constructor
*/
public Server(String host, int port, int id) {
this.host = host;
this.port = port;