package com.strobel.decompiler.languages;

import java.util.Collections;
import java.util.List;

/**
 * <code>TypeCompilationResults</code> holds the result of decompiling a single type.
 */
public class TypeDecompilationResults {
    
    /** the mapping from original line numbers to post-compiled line numbers */
    private final List<LineNumberPosition> _lineNumberPositions;
    
    /**
     * Constructs decompilation results.
     * 
     * @param lineNumberPositions the mapping of original to decompiled line numbers,
     *    or <code>null</code> if the decompilation target language does not support
     *    line numbers.
     */
    public TypeDecompilationResults( List<LineNumberPosition> lineNumberPositions) {
        _lineNumberPositions = lineNumberPositions;
    }
    
    /**
     * Returns the line number positions resulting from a decompilation.
     *
     * @return an unmodifiable list containing the line number positions resulting
     *    from a decompilation.  May be null if the decompilation target language
     *    does not support line numbers.
     */
    public List<LineNumberPosition> getLineNumberPositions() {
        return Collections.unmodifiableList( _lineNumberPositions);
    }
}

@@ -224,28 +224,24 @@
 sults %7B%0A
-    
 %0A    /**
  the map
@@ -232,16 +232,23 @@
 %0A    /**
+%0A     *
  the map
@@ -308,16 +308,21 @@
  numbers
+%0A    
  */%0A    
@@ -382,20 +382,16 @@
 itions;%0A
-    
 %0A    /**
@@ -438,17 +438,16 @@
 .%0A     *
- 
 %0A     * 
@@ -472,16 +472,27 @@
 ositions
+%0A     *    
  the map
@@ -535,26 +535,16 @@
 numbers,
-%0A     *   
  or %3Ccod
@@ -559,24 +559,35 @@
 code%3E if the
+%0A     *    
  decompilati
@@ -621,26 +621,16 @@
  support
-%0A     *   
  line nu
@@ -680,16 +680,21 @@
 Results(
+final
  List%3CLi
@@ -792,20 +792,16 @@
 ;%0A    %7D%0A
-    
 %0A    /**
@@ -966,24 +966,29 @@
 lting%0A     *
+     
     from a d
@@ -1053,24 +1053,29 @@
 guage%0A     *
+     
     does not
@@ -1164,24 +1164,122 @@
 sitions() %7B%0A
+        if (_lineNumberPositions == null) %7B%0A            return Collections.emptyList();%0A        %7D%0A
         retu
@@ -1310,17 +1310,16 @@
 bleList(
- 
 _lineNum

Fix for NullPointerException when decompiling with `-r`.