refactor: Tackle a few Semgrep and ErrorProne violations (#1520)

* refactor: Tackle a few Semgrep and ErrorProne violations

* Address comments
This commit is contained in:
Alex
2022-01-07 12:45:53 +01:00
committed by GitHub
parent f27959e49a
commit 64442a8051
22 changed files with 55 additions and 400 deletions

View File

@ -340,6 +340,7 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
//FAWE end
@Override
@SuppressWarnings("RedundantCast")
public Map<Property<?>, Object> getStates() {
//FAWE end
BlockType type = this.getBlockType();
@ -348,7 +349,7 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
type.getPropertiesSet(),
(Function<Property<?>, Object>) this::getState
);
//noinspection RedundantCast - This is required for compilation, etc.
//This is required for compilation, etc.
return Collections.unmodifiableMap((Map<Property<?>, Object>) map);
//FAWE end
}