From c965e60f5e2f10cf815258310f0f882140333bfc Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Jul 2014 19:49:03 +1000 Subject: [PATCH] Cipher thread locals should be static --- native/src/main/java/net/md_5/bungee/FallbackCipher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/src/main/java/net/md_5/bungee/FallbackCipher.java b/native/src/main/java/net/md_5/bungee/FallbackCipher.java index 3c9ee078..1b2fc267 100644 --- a/native/src/main/java/net/md_5/bungee/FallbackCipher.java +++ b/native/src/main/java/net/md_5/bungee/FallbackCipher.java @@ -11,9 +11,9 @@ import java.security.GeneralSecurityException; public class FallbackCipher implements BungeeCipher { - private Cipher cipher; - private ThreadLocal heapInLocal = new EmptyByteThreadLocal(); - private ThreadLocal heapOutLocal = new EmptyByteThreadLocal(); + private final Cipher cipher; + private static final ThreadLocal heapInLocal = new EmptyByteThreadLocal(); + private static final ThreadLocal heapOutLocal = new EmptyByteThreadLocal(); private static class EmptyByteThreadLocal extends ThreadLocal {