X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FFcpConnection.java;h=2688d2181cc6d20cda4c278fb1b6fc3bc9fc7d94;hb=50f1c4c53c9c3435bd1a0e33d1b949a22eab9df7;hp=84f7ce9f8cba0451b471a0ae7dc967f4730a10f8;hpb=2300288313c9c24fc254a21c6324a698e4a786ad;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/FcpConnection.java b/src/main/java/net/pterodactylus/fcp/FcpConnection.java index 84f7ce9..2688d21 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpConnection.java +++ b/src/main/java/net/pterodactylus/fcp/FcpConnection.java @@ -68,7 +68,7 @@ public class FcpConnection implements Closeable { private FcpConnectionHandler connectionHandler; /** Incoming message statistics. */ - private Map incomingMessageStatistics = Collections.synchronizedMap(new HashMap()); + private static final Map incomingMessageStatistics = Collections.synchronizedMap(new HashMap()); /** * Creates a new FCP connection to the freenet node running on localhost, @@ -196,6 +196,7 @@ public class FcpConnection implements Closeable { * Closes the connection. If there is no connection to the node, this method * does nothing. */ + @Override public void close() { handleDisconnect(null); } @@ -454,7 +455,7 @@ public class FcpConnection implements Closeable { * @see java.io.FilterInputStream#mark(int) */ @Override - public void mark(int readlimit) { + public synchronized void mark(int readlimit) { /* do nothing. */ } @@ -476,7 +477,7 @@ public class FcpConnection implements Closeable { * @see java.io.FilterInputStream#reset() */ @Override - public void reset() throws IOException { + public synchronized void reset() throws IOException { /* do nothing. */ }