Suppress injection test warnings

This commit is contained in:
Gabriele C 2016-05-23 23:16:40 +02:00
parent 30f62547d8
commit da6431b4fc
4 changed files with 6 additions and 4 deletions

View File

@ -114,6 +114,7 @@ public class FieldInjection<T> implements Injection<T> {
return null;
}
@SuppressWarnings("unchecked")
private static <T> Constructor<T> getDefaultConstructor(Class<T> clazz) {
try {
Constructor<?> defaultConstructor = clazz.getDeclaredConstructor();

View File

@ -1,6 +1,5 @@
package fr.xephi.authme.process.logout;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.cache.auth.PlayerCache;
import fr.xephi.authme.cache.limbo.LimboCache;
@ -17,9 +16,6 @@ import javax.inject.Inject;
public class AsynchronousLogout implements AsynchronousProcess {
@Inject
private AuthMe plugin;
@Inject
private DataSource database;

View File

@ -22,6 +22,7 @@ import static org.junit.Assert.assertThat;
/**
* Test for {@link FieldInjection}.
*/
public class FieldInjectionTest {
@SuppressWarnings("unchecked")
@ -114,6 +115,8 @@ public class FieldInjectionTest {
assertThat(injection, nullValue());
}
@SuppressWarnings("unused")
private static class ThrowingConstructor {
@Inject
private ProvidedClass providedClass;

View File

@ -6,6 +6,8 @@ import javax.inject.Inject;
/**
* Class with invalid @PostConstruct method.
*/
@SuppressWarnings("unused")
public abstract class InvalidPostConstruct {
public static final class WithParams {