Skip to content

Commit 532e862

Browse files
author
Steve Salas
committed
Squashed 'bytefrog/' changes from ed3fe53a..989f4ca3
989f4ca3 Merges v2 into master 8c7ab2b8 Fix unit tests to passing states 884936f5 Fixed issue with ASM usage git-subtree-dir: bytefrog git-subtree-split: 989f4ca34a80f5e1f5c66de43c34c2e47b57676d
1 parent 449dc4c commit 532e862

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

instrumentation/src/main/java/com/codedx/bytefrog/instrumentation/LineLevelMapper.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,19 @@ public static LineLevelMapper parse(String sourceFile, String smap) {
121121
private LineLevelMapper(String filename, Map<Integer, List<MappedLocation>> rawMappings) {
122122
this.filename = filename;
123123

124-
mappings = new HashMap<>(rawMappings.size());
125-
for (Map.Entry<Integer, List<MappedLocation>> mapping : rawMappings.entrySet()) {
126-
mappings.put(
127-
mapping.getKey(),
128-
mapping.getValue().toArray(new MappedLocation[0])
129-
);
124+
if(rawMappings != null)
125+
{
126+
mappings = new HashMap<>(rawMappings.size());
127+
for (Map.Entry<Integer, List<MappedLocation>> mapping : rawMappings.entrySet()) {
128+
mappings.put(
129+
mapping.getKey(),
130+
mapping.getValue().toArray(new MappedLocation[0])
131+
);
132+
}
133+
}
134+
else
135+
{
136+
mappings = new HashMap<>(64);
130137
}
131138
}
132139

0 commit comments

Comments
 (0)