Cipher thread locals should be static

This commit is contained in:
md_5 2014-07-12 19:49:03 +10:00
parent 02e219262a
commit c965e60f5e

View File

@ -11,9 +11,9 @@ import java.security.GeneralSecurityException;
public class FallbackCipher implements BungeeCipher
{
private Cipher cipher;
private ThreadLocal<byte[]> heapInLocal = new EmptyByteThreadLocal();
private ThreadLocal<byte[]> heapOutLocal = new EmptyByteThreadLocal();
private final Cipher cipher;
private static final ThreadLocal<byte[]> heapInLocal = new EmptyByteThreadLocal();
private static final ThreadLocal<byte[]> heapOutLocal = new EmptyByteThreadLocal();
private static class EmptyByteThreadLocal extends ThreadLocal<byte[]>
{