Fix null related issues in CFRObfuscationMapping

dev/0.11
modmuss50 2021-10-14 18:14:23 +01:00
parent c380b36739
commit d834895ff2
1 changed files with 6 additions and 3 deletions

View File

@ -180,17 +180,20 @@ public class CFRObfuscationMapping extends NullMapping {
public Dumper dumpFieldDoc(Field field, JavaTypeInstance owner) {
// None static fields in records are handled in the class javadoc.
if (isRecord(owner) && !isStatic(field)) {
return null;
return this;
}
MappingTree.ClassMapping classMapping = getClassMapping(owner);
if (classMapping == null) {
return null;
return this;
}
MappingTree.FieldMapping fieldMapping = classMapping.getField(field.getFieldName(), field.getDescriptor());
if (fieldMapping != null) {
dumpComment(fieldMapping.getComment());
}
return this;
}