Update Upstream

609c7b8 Scrapped Logging Framework 4 Java

Closes #997
Closes #998
Closes #999
Closes #1000
Closes #1001
Closes #1002
This commit is contained in:
NotMyFault
2021-03-29 15:29:16 +02:00
parent 2dc89f735d
commit b96cea75b8
118 changed files with 700 additions and 743 deletions

View File

@ -19,10 +19,10 @@
package com.sk89q.minecraft.util.commands;
import com.sk89q.worldedit.internal.util.LogManagerCompat;
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashSet;
@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.fail;
public class CommandContextTest {
private static final Logger log = LoggerFactory.getLogger(CommandContextTest.class);
private static final Logger LOGGER = LogManagerCompat.getLogger();
private static final String firstCmdString = "herpderp -opw testers \"mani world\" 'another thing' because something";
CommandContext firstCommand;
@ -45,7 +45,7 @@ public class CommandContextTest {
try {
firstCommand = new CommandContext(firstCmdString, new HashSet<>(Arrays.asList('o', 'w')));
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Unexpected exception when creating CommandContext");
}
}
@ -86,7 +86,7 @@ public class CommandContextTest {
new CommandContext(cmd);
new CommandContext(cmd2);
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -97,7 +97,7 @@ public class CommandContextTest {
try {
new CommandContext(cmd);
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -108,7 +108,7 @@ public class CommandContextTest {
try {
new CommandContext(cmd);
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -122,7 +122,7 @@ public class CommandContextTest {
CommandContext context2 = new CommandContext("r hello -f world");
assertTrue(context2.hasFlag('f'));
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -138,7 +138,7 @@ public class CommandContextTest {
CommandContext context2 = new CommandContext("pm name \"hello world\" foo bar");
assertEquals("\"hello world\" foo bar", context2.getJoinedStrings(1));
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -150,7 +150,7 @@ public class CommandContextTest {
assertArrayEquals(new String[] { "foo", "bar", "baz" }, context.getSlice(0));
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}
@ -161,7 +161,7 @@ public class CommandContextTest {
CommandContext context = new CommandContext("region flag xmas blocked-cmds \"\"");
assertEquals(context.argsLength(), 3);
} catch (CommandException e) {
log.warn("Error", e);
LOGGER.warn("Error", e);
fail("Error creating CommandContext");
}
}

View File

@ -26,7 +26,6 @@ import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.io.file.ArchiveNioSupport;
import com.sk89q.worldedit.util.io.file.ArchiveNioSupports;
import com.sk89q.worldedit.util.io.file.TrueVfsArchiveNioSupport;
import com.sk89q.worldedit.util.io.file.ZipArchiveNioSupport;
import com.sk89q.worldedit.world.DataException;
import com.sk89q.worldedit.world.storage.ChunkStoreHelper;
@ -161,7 +160,7 @@ class FileSystemSnapshotDatabaseTest {
@TestFactory
Stream<DynamicNode> withSpecificNioSupport() {
return Stream.of(
ZipArchiveNioSupport.getInstance(), TrueVfsArchiveNioSupport.getInstance()
ZipArchiveNioSupport.getInstance()
)
.map(nioSupport -> {
Stream<? extends DynamicNode> nodes = Stream.of(FSSDTestType.values())