#3126: Use suppliers instead of reflection for native impl generation.
This commit is contained in:
@@ -31,7 +31,7 @@ public class EncryptionUtil
|
||||
public static final KeyPair keys;
|
||||
@Getter
|
||||
private static final SecretKey secret = new SecretKeySpec( new byte[ 16 ], "AES" );
|
||||
public static final NativeCode<BungeeCipher> nativeFactory = new NativeCode<>( "native-cipher", JavaCipher.class, NativeCipher.class );
|
||||
public static final NativeCode<BungeeCipher> nativeFactory = new NativeCode<>( "native-cipher", JavaCipher::new, NativeCipher::new );
|
||||
|
||||
static
|
||||
{
|
||||
|
@@ -8,5 +8,5 @@ import net.md_5.bungee.jni.zlib.NativeZlib;
|
||||
public class CompressFactory
|
||||
{
|
||||
|
||||
public static final NativeCode<BungeeZlib> zlib = new NativeCode<>( "native-compress", JavaZlib.class, NativeZlib.class );
|
||||
public static final NativeCode<BungeeZlib> zlib = new NativeCode<>( "native-compress", JavaZlib::new, NativeZlib::new );
|
||||
}
|
||||
|
Reference in New Issue
Block a user