From f77677f1f4d5e7a1af418a5aaf975343c33fac37 Mon Sep 17 00:00:00 2001 From: zzz <zzz@i2pmail.org> Date: Wed, 5 May 2021 10:58:16 -0400 Subject: [PATCH] Router: Unused methods and fields (findbugs) --- router/java/src/net/i2p/router/Blocklist.java | 2 ++ .../src/net/i2p/router/transport/ntcp/NTCPConnection.java | 8 ++++---- .../net/i2p/router/transport/udp/IntroductionManager.java | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/router/java/src/net/i2p/router/Blocklist.java b/router/java/src/net/i2p/router/Blocklist.java index bdcbb231b0..fd32c222ee 100644 --- a/router/java/src/net/i2p/router/Blocklist.java +++ b/router/java/src/net/i2p/router/Blocklist.java @@ -914,10 +914,12 @@ public class Blocklist { return match(ip, blocklist[cur]); } +/* // Is the IP included in the entry _blocklist[cur] ? private boolean match(int ip, int cur) { return match(ip, _blocklist[cur]); } +*/ // Is the IP included in the compressed entry? private static boolean match(int ip, long entry) { diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java index 839a7530b4..890f06117d 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java @@ -616,16 +616,16 @@ public class NTCPConnection implements Closeable { static class PrepBuffer { final byte unencrypted[]; - int unencryptedLength; - byte encrypted[]; + //int unencryptedLength; + //byte encrypted[]; public PrepBuffer() { unencrypted = new byte[BUFFER_SIZE]; } public void init() { - unencryptedLength = 0; - encrypted = null; + //unencryptedLength = 0; + //encrypted = null; } } diff --git a/router/java/src/net/i2p/router/transport/udp/IntroductionManager.java b/router/java/src/net/i2p/router/transport/udp/IntroductionManager.java index f0d8736310..cd65edd577 100644 --- a/router/java/src/net/i2p/router/transport/udp/IntroductionManager.java +++ b/router/java/src/net/i2p/router/transport/udp/IntroductionManager.java @@ -645,9 +645,11 @@ class IntroductionManager { * Refuse anybody in the same /16 * @since 0.9.3 */ +/* private boolean isValid(byte[] ip, int port) { return isValid(ip, port, false); } +*/ /** * Are IP and port valid? -- GitLab