mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:58:35 +00:00
refactor: Tackle a few Semgrep and ErrorProne violations (#1520)
* refactor: Tackle a few Semgrep and ErrorProne violations * Address comments
This commit is contained in:
@ -192,8 +192,8 @@ public class TargetBlock {
|
||||
*
|
||||
* @return Block
|
||||
*/
|
||||
@SuppressWarnings("StatementWithEmptyBody")
|
||||
public Location getTargetBlock() {
|
||||
//noinspection StatementWithEmptyBody
|
||||
while (getNextBlock() != null && !stopMask.test(targetPos)) {
|
||||
}
|
||||
return getCurrentBlock();
|
||||
@ -205,8 +205,8 @@ public class TargetBlock {
|
||||
*
|
||||
* @return Block
|
||||
*/
|
||||
@SuppressWarnings("StatementWithEmptyBody")
|
||||
public Location getSolidTargetBlock() {
|
||||
//noinspection StatementWithEmptyBody
|
||||
while (getNextBlock() != null && !solidMask.test(targetPos)) {
|
||||
}
|
||||
return getCurrentBlock();
|
||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.util.logging;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Objects;
|
||||
import java.util.logging.Filter;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Level;
|
||||
@ -131,11 +132,7 @@ public class DynamicStreamHandler extends StreamHandler {
|
||||
Formatter formatter = this.formatter;
|
||||
if (handler != null) {
|
||||
return handler.getFormatter();
|
||||
} else if (formatter != null) {
|
||||
return formatter;
|
||||
} else {
|
||||
return new SimpleFormatter();
|
||||
}
|
||||
} else return Objects.requireNonNullElseGet(formatter, SimpleFormatter::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user