decompiler: fixed incorrect line numbers in dumped mapping

master
Egor.Ushakov 10 years ago
parent a721490f62
commit 47fad13908
  1. 2
      src/org/jetbrains/java/decompiler/main/collectors/BytecodeSourceMapper.java
  2. 18
      testData/results/TestClassSimpleBytecodeMapping.dec

@ -97,7 +97,7 @@ public class BytecodeSourceMapper {
buffer.append("Lines mapping:").appendLineSeparator(); buffer.append("Lines mapping:").appendLineSeparator();
Map<Integer, Integer> sorted = new TreeMap<Integer, Integer>(linesMapping); Map<Integer, Integer> sorted = new TreeMap<Integer, Integer>(linesMapping);
for (Entry<Integer, Integer> entry : sorted.entrySet()) { for (Entry<Integer, Integer> entry : sorted.entrySet()) {
buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()).appendLineSeparator(); buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()+ offset_total + 1).appendLineSeparator();
} }
} }

@ -58,12 +58,12 @@ class 'pkg/TestClassSimpleBytecodeMapping' {
} }
Lines mapping: Lines mapping:
12 <-> 2 12 <-> 5
14 <-> 3 14 <-> 6
17 <-> 5 17 <-> 8
21 <-> 8 21 <-> 11
22 <-> 9 22 <-> 12
23 <-> 10 23 <-> 13
25 <-> 12 25 <-> 15
26 <-> 13 26 <-> 16
31 <-> 18 31 <-> 21

Loading…
Cancel
Save