draft: Address false positives in code style issues (#3461)

* chore: Address false positive code style issues

* chore: More work

* More work
This commit is contained in:
Alex
2022-01-20 12:39:40 +01:00
committed by GitHub
parent 6f4d2f6d5a
commit 827f46566c
16 changed files with 30 additions and 13 deletions

View File

@ -53,7 +53,7 @@ public abstract class MetaDataAccess<T> implements AutoCloseable {
this.lockAccess = lockAccess;
}
@SuppressWarnings("ALL")
@SuppressWarnings("unchecked")
private static <E extends Throwable> void sneakyThrow(final Throwable e) throws E {
throw (E) e;
}

View File

@ -96,7 +96,7 @@ public class FlagContainer {
}
/**
* Cast a plot flag with wildcard parameters into a parametrisized
* Cast a plot flag with wildcard parameters into a parametrized
* PlotFlag. This is an unsafe operation, and should only be performed
* if the generic parameters are known beforehand.
*
@ -105,7 +105,7 @@ public class FlagContainer {
* @param <T> Flag type
* @return Casted flag
*/
@SuppressWarnings("ALL")
@SuppressWarnings("unchecked")
public static <V, T extends PlotFlag<V, ?>> T castUnsafe(
final PlotFlag<?, ?> flag
) {
@ -181,6 +181,7 @@ public class FlagContainer {
* @param <V> flag value type
* @return value of flag removed
*/
@SuppressWarnings("unchecked")
public <V, T extends PlotFlag<V, ?>> V removeFlag(final T flag) {
final Object value = this.flagMap.remove(flag.getClass());
if (this.plotFlagUpdateHandler != null) {

View File

@ -73,6 +73,7 @@ public class EntityUtil {
return i;
}
@SuppressWarnings("unchecked")
public static boolean checkEntity(Plot plot, PlotFlag<Integer, ?>... flags) {
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
return true;