diff options
| author | 2020-11-15 11:48:06 +0100 | |
|---|---|---|
| committer | 2020-11-15 11:48:06 +0100 | |
| commit | 361c0c86b2b37fe41daf212423380a4057b3f102 (patch) | |
| tree | 08ca580be8f4c7a5c6d0f514922c642c4bba1c28 | |
| parent | Merge pull request #323 from YanisBft/various (diff) | |
| parent | Do not abort decompile command on decompiler errors (diff) | |
| download | enigma-361c0c86b2b37fe41daf212423380a4057b3f102.tar.gz enigma-361c0c86b2b37fe41daf212423380a4057b3f102.tar.xz enigma-361c0c86b2b37fe41daf212423380a4057b3f102.zip | |
Merge pull request #322 from ComunidadAylas/master
Do not abort decompile command on decompiler errors
| -rw-r--r-- | enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java | 3 | ||||
| -rw-r--r-- | enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java b/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java index cc628639..12a4e886 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java +++ b/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java | |||
| @@ -2,6 +2,7 @@ package cuchaz.enigma.command; | |||
| 2 | 2 | ||
| 3 | import cuchaz.enigma.EnigmaProject; | 3 | import cuchaz.enigma.EnigmaProject; |
| 4 | import cuchaz.enigma.ProgressListener; | 4 | import cuchaz.enigma.ProgressListener; |
| 5 | import cuchaz.enigma.EnigmaProject.DecompileErrorStrategy; | ||
| 5 | import cuchaz.enigma.source.DecompilerService; | 6 | import cuchaz.enigma.source.DecompilerService; |
| 6 | import cuchaz.enigma.source.Decompilers; | 7 | import cuchaz.enigma.source.Decompilers; |
| 7 | 8 | ||
| @@ -47,7 +48,7 @@ public class DecompileCommand extends Command { | |||
| 47 | ProgressListener progress = new ConsoleProgressListener(); | 48 | ProgressListener progress = new ConsoleProgressListener(); |
| 48 | 49 | ||
| 49 | EnigmaProject.JarExport jar = project.exportRemappedJar(progress); | 50 | EnigmaProject.JarExport jar = project.exportRemappedJar(progress); |
| 50 | EnigmaProject.SourceExport source = jar.decompile(progress, decompilerService); | 51 | EnigmaProject.SourceExport source = jar.decompile(progress, decompilerService, DecompileErrorStrategy.TRACE_AS_SOURCE); |
| 51 | 52 | ||
| 52 | source.write(fileJarOut, progress); | 53 | source.write(fileJarOut, progress); |
| 53 | } | 54 | } |
diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java index f6420d2b..fcd2c96a 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java +++ b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | |||
| @@ -216,10 +216,6 @@ public class EnigmaProject { | |||
| 216 | } | 216 | } |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | public SourceExport decompile(ProgressListener progress, DecompilerService decompilerService) { | ||
| 220 | return this.decompile(progress, decompilerService, DecompileErrorStrategy.PROPAGATE); | ||
| 221 | } | ||
| 222 | |||
| 223 | public SourceExport decompile(ProgressListener progress, DecompilerService decompilerService, DecompileErrorStrategy errorStrategy) { | 219 | public SourceExport decompile(ProgressListener progress, DecompilerService decompilerService, DecompileErrorStrategy errorStrategy) { |
| 224 | List<ClassSource> decompiled = this.decompileStream(progress, decompilerService, errorStrategy).collect(Collectors.toList()); | 220 | List<ClassSource> decompiled = this.decompileStream(progress, decompilerService, errorStrategy).collect(Collectors.toList()); |
| 225 | return new SourceExport(decompiled); | 221 | return new SourceExport(decompiled); |