Fix some compiler warnings

This commit is contained in:
md_5
2017-10-28 17:08:05 +11:00
parent 4e2897710b
commit 0fc5694b6a
11 changed files with 21 additions and 18 deletions

View File

@@ -12,12 +12,12 @@ public final class NativeCode<T>
{
private final String name;
private final Class<T> javaImpl;
private final Class<T> nativeImpl;
private final Class<? extends T> javaImpl;
private final Class<? extends T> nativeImpl;
//
private boolean loaded;
public NativeCode(String name, Class<T> javaImpl, Class<T> nativeImpl)
public NativeCode(String name, Class<? extends T> javaImpl, Class<? extends T> nativeImpl)
{
this.name = name;
this.javaImpl = javaImpl;

View File

@@ -26,7 +26,7 @@ public class NativeCipherTest
private final SecretKey secret = new SecretKeySpec( new byte[ 16 ], "AES" );
private static final int BENCHMARK_COUNT = 4096;
//
private static final NativeCode<BungeeCipher> factory = new NativeCode( "native-cipher", JavaCipher.class, NativeCipher.class );
private static final NativeCode<BungeeCipher> factory = new NativeCode<>( "native-cipher", JavaCipher.class, NativeCipher.class );
@Test
public void testNative() throws Exception

View File

@@ -15,7 +15,7 @@ import org.junit.Test;
public class NativeZlibTest
{
private final NativeCode<BungeeZlib> factory = new NativeCode( "native-compress", JavaZlib.class, NativeZlib.class );
private final NativeCode<BungeeZlib> factory = new NativeCode<>( "native-compress", JavaZlib.class, NativeZlib.class );
@Test
public void doTest() throws DataFormatException