From 6d43730a762ed4a54321d14c8a4b5c3af2b80e23 Mon Sep 17 00:00:00 2001 From: J. Fronny Date: Thu, 21 Aug 2025 20:11:13 +0200 Subject: Get rid of Guava (#555) * Get rid of Guava * Fix NPE * Apply suggestions from review * Checkstyle * Add braces to precondition checks * Forbid space--- enigma-cli/src/main/java/cuchaz/enigma/command/Command.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'enigma-cli/src/main/java') diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java b/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java index de06fa6e..06c49162 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java +++ b/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java @@ -6,7 +6,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import com.google.common.io.MoreFiles; import net.fabricmc.mappingio.MappingReader; import net.fabricmc.mappingio.tree.MemoryMappingTree; import net.fabricmc.mappingio.tree.VisitableMappingTree; @@ -57,7 +56,7 @@ public abstract class Command { protected static EntryTree readMappings(Path path, ProgressListener progress, MappingSaveParameters saveParameters) throws IOException, MappingParseException { // Legacy - if ("zip".equalsIgnoreCase(MoreFiles.getFileExtension(path))) { + if (path.getFileName().toString().toLowerCase().endsWith(".zip")) { return MappingFormat.ENIGMA_ZIP.read(path, progress, saveParameters, null); } -- cgit v1.2.3