diff options
| author | 2025-08-21 20:11:13 +0200 | |
|---|---|---|
| committer | 2025-08-21 19:11:13 +0100 | |
| commit | 6d43730a762ed4a54321d14c8a4b5c3af2b80e23 (patch) | |
| tree | 809b0e656bc28fb8997958ecca299b62c0bbf15f /enigma-cli | |
| parent | Services rework (#554) (diff) | |
| download | enigma-fork-6d43730a762ed4a54321d14c8a4b5c3af2b80e23.tar.gz enigma-fork-6d43730a762ed4a54321d14c8a4b5c3af2b80e23.tar.xz enigma-fork-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.java | 3 |
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 de06fa6..06c4916 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; | |||
| 6 | import java.nio.file.Path; | 6 | import java.nio.file.Path; |
| 7 | import java.nio.file.Paths; | 7 | import java.nio.file.Paths; |
| 8 | 8 | ||
| 9 | import com.google.common.io.MoreFiles; | ||
| 10 | import net.fabricmc.mappingio.MappingReader; | 9 | import net.fabricmc.mappingio.MappingReader; |
| 11 | import net.fabricmc.mappingio.tree.MemoryMappingTree; | 10 | import net.fabricmc.mappingio.tree.MemoryMappingTree; |
| 12 | import net.fabricmc.mappingio.tree.VisitableMappingTree; | 11 | import 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 | ||