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