From 424665be0aa4efa602806ae78348d6810621aee9 Mon Sep 17 00:00:00 2001 From: nbauma109 Date: Sun, 13 Mar 2022 09:59:59 +0100 Subject: [PATCH] Fix Procyon line number realignment --- .../procyon/decompiler/ProcyonDecompiler.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/org.sf.feeling.decompiler.procyon/src/org/sf/feeling/decompiler/procyon/decompiler/ProcyonDecompiler.java b/org.sf.feeling.decompiler.procyon/src/org/sf/feeling/decompiler/procyon/decompiler/ProcyonDecompiler.java index 69b10474..d03f981e 100644 --- a/org.sf.feeling.decompiler.procyon/src/org/sf/feeling/decompiler/procyon/decompiler/ProcyonDecompiler.java +++ b/org.sf.feeling.decompiler.procyon/src/org/sf/feeling/decompiler/procyon/decompiler/ProcyonDecompiler.java @@ -61,12 +61,7 @@ public void decompile(String root, String packege, String className) { final String classPathStr = new File(workingDir, className).getAbsolutePath(); - boolean includeLineNumbers = false; - boolean stretchLines = false; - if (ClassUtil.isDebug()) { - includeLineNumbers = true; - stretchLines = true; - } + final boolean includeLineNumbers = ClassUtil.isDebug(); DecompilationOptions decompilationOptions = new DecompilationOptions(); @@ -110,16 +105,10 @@ public void decompile(String root, String packege, String className) { List lineNumberPositions = results.getLineNumberPositions(); - if (includeLineNumbers || stretchLines) { + if (includeLineNumbers) { EnumSet lineNumberOptions = EnumSet.noneOf(LineNumberOption.class); - if (includeLineNumbers) { - lineNumberOptions.add(LineNumberFormatter.LineNumberOption.LEADING_COMMENTS); - } - - if (stretchLines) { - lineNumberOptions.add(LineNumberFormatter.LineNumberOption.STRETCHED); - } + lineNumberOptions.add(LineNumberFormatter.LineNumberOption.LEADING_COMMENTS); LineNumberFormatter lineFormatter = new LineNumberFormatter(classFile, lineNumberPositions, lineNumberOptions);