mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-29 20:17:36 +01:00
Suppress injection test warnings
This commit is contained in:
parent
30f62547d8
commit
da6431b4fc
@ -114,6 +114,7 @@ public class FieldInjection<T> implements Injection<T> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private static <T> Constructor<T> getDefaultConstructor(Class<T> clazz) {
|
private static <T> Constructor<T> getDefaultConstructor(Class<T> clazz) {
|
||||||
try {
|
try {
|
||||||
Constructor<?> defaultConstructor = clazz.getDeclaredConstructor();
|
Constructor<?> defaultConstructor = clazz.getDeclaredConstructor();
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package fr.xephi.authme.process.logout;
|
package fr.xephi.authme.process.logout;
|
||||||
|
|
||||||
import fr.xephi.authme.AuthMe;
|
|
||||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||||
@ -17,9 +16,6 @@ import javax.inject.Inject;
|
|||||||
|
|
||||||
public class AsynchronousLogout implements AsynchronousProcess {
|
public class AsynchronousLogout implements AsynchronousProcess {
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuthMe plugin;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private DataSource database;
|
private DataSource database;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import static org.junit.Assert.assertThat;
|
|||||||
/**
|
/**
|
||||||
* Test for {@link FieldInjection}.
|
* Test for {@link FieldInjection}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FieldInjectionTest {
|
public class FieldInjectionTest {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@ -114,6 +115,8 @@ public class FieldInjectionTest {
|
|||||||
assertThat(injection, nullValue());
|
assertThat(injection, nullValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private static class ThrowingConstructor {
|
private static class ThrowingConstructor {
|
||||||
@Inject
|
@Inject
|
||||||
private ProvidedClass providedClass;
|
private ProvidedClass providedClass;
|
||||||
|
@ -6,6 +6,8 @@ import javax.inject.Inject;
|
|||||||
/**
|
/**
|
||||||
* Class with invalid @PostConstruct method.
|
* Class with invalid @PostConstruct method.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public abstract class InvalidPostConstruct {
|
public abstract class InvalidPostConstruct {
|
||||||
|
|
||||||
public static final class WithParams {
|
public static final class WithParams {
|
||||||
|
Loading…
Reference in New Issue
Block a user