summaryrefslogtreecommitdiff
path: root/enigma-cli
diff options
context:
space:
mode:
authorGravatar J. Fronny2025-08-21 20:11:13 +0200
committerGravatar GitHub2025-08-21 19:11:13 +0100
commit6d43730a762ed4a54321d14c8a4b5c3af2b80e23 (patch)
tree809b0e656bc28fb8997958ecca299b62c0bbf15f /enigma-cli
parentServices rework (#554) (diff)
downloadenigma-6d43730a762ed4a54321d14c8a4b5c3af2b80e23.tar.gz
enigma-6d43730a762ed4a54321d14c8a4b5c3af2b80e23.tar.xz
enigma-6d43730a762ed4a54321d14c8a4b5c3af2b80e23.zip
Get rid of Guava (#555)
* Get rid of Guava * Fix NPE * Apply suggestions from review * Checkstyle * Add braces to precondition checks * Forbid space
Diffstat (limited to 'enigma-cli')
-rw-r--r--enigma-cli/src/main/java/cuchaz/enigma/command/Command.java3
1 files changed, 1 insertions, 2 deletions
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;
6import java.nio.file.Path; 6import java.nio.file.Path;
7import java.nio.file.Paths; 7import java.nio.file.Paths;
8 8
9import com.google.common.io.MoreFiles;
10import net.fabricmc.mappingio.MappingReader; 9import net.fabricmc.mappingio.MappingReader;
11import net.fabricmc.mappingio.tree.MemoryMappingTree; 10import net.fabricmc.mappingio.tree.MemoryMappingTree;
12import net.fabricmc.mappingio.tree.VisitableMappingTree; 11import net.fabricmc.mappingio.tree.VisitableMappingTree;
@@ -57,7 +56,7 @@ public abstract class Command {
57 56
58 protected static EntryTree<EntryMapping> readMappings(Path path, ProgressListener progress, MappingSaveParameters saveParameters) throws IOException, MappingParseException { 57 protected static EntryTree<EntryMapping> readMappings(Path path, ProgressListener progress, MappingSaveParameters saveParameters) throws IOException, MappingParseException {
59 // Legacy 58 // Legacy
60 if ("zip".equalsIgnoreCase(MoreFiles.getFileExtension(path))) { 59 if (path.getFileName().toString().toLowerCase().endsWith(".zip")) {
61 return MappingFormat.ENIGMA_ZIP.read(path, progress, saveParameters, null); 60 return MappingFormat.ENIGMA_ZIP.read(path, progress, saveParameters, null);
62 } 61 }
63 62