Cipher thread locals should be static
This commit is contained in:
parent
02e219262a
commit
c965e60f5e
@ -11,9 +11,9 @@ import java.security.GeneralSecurityException;
|
|||||||
public class FallbackCipher implements BungeeCipher
|
public class FallbackCipher implements BungeeCipher
|
||||||
{
|
{
|
||||||
|
|
||||||
private Cipher cipher;
|
private final Cipher cipher;
|
||||||
private ThreadLocal<byte[]> heapInLocal = new EmptyByteThreadLocal();
|
private static final ThreadLocal<byte[]> heapInLocal = new EmptyByteThreadLocal();
|
||||||
private ThreadLocal<byte[]> heapOutLocal = new EmptyByteThreadLocal();
|
private static final ThreadLocal<byte[]> heapOutLocal = new EmptyByteThreadLocal();
|
||||||
|
|
||||||
private static class EmptyByteThreadLocal extends ThreadLocal<byte[]>
|
private static class EmptyByteThreadLocal extends ThreadLocal<byte[]>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user