Code cleanup (#1461)

* Code cleanup

* Fix flux tests

* Fix checkstyle errors

* Fix compile error
This commit is contained in:
Ilkka Seppälä
2020-07-30 20:28:47 +03:00
committed by GitHub
parent 5381387026
commit 417f21ed3d
243 changed files with 1154 additions and 1162 deletions

View File

@ -89,8 +89,8 @@ import java.util.List;
public class App {
private NioReactor reactor;
private List<AbstractNioChannel> channels = new ArrayList<>();
private Dispatcher dispatcher;
private final List<AbstractNioChannel> channels = new ArrayList<>();
private final Dispatcher dispatcher;
/**
* Creates an instance of App which will use provided dispatcher for dispatching events on

View File

@ -134,7 +134,7 @@ public class NioDatagramChannel extends AbstractNioChannel {
*/
public static class DatagramPacket {
private SocketAddress sender;
private ByteBuffer data;
private final ByteBuffer data;
private SocketAddress receiver;
/**

View File

@ -228,8 +228,8 @@ public class NioReactor {
* A command that changes the interested operations of the key provided.
*/
class ChangeKeyOpsCommand implements Runnable {
private SelectionKey key;
private int interestedOps;
private final SelectionKey key;
private final int interestedOps;
public ChangeKeyOpsCommand(SelectionKey key, int interestedOps) {
this.key = key;