Skip to content

Commit

Permalink
Add null check for referencedSyntheticMethodForDelegateMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjameshamilton committed May 30, 2023
1 parent 309aff5 commit f5f04c5
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public void visitAnyProperty(Clazz clazz,
// If the types are invalid this will throw an exception.
print(ClassUtil.externalFullFieldDescription(0,
kotlinPropertyMetadata.backingFieldSignature.memberName,
kotlinPropertyMetadata.backingFieldSignature.descriptor.toString()));
kotlinPropertyMetadata.backingFieldSignature.descriptor));
}
catch (IllegalArgumentException e)
{
Expand All @@ -744,11 +744,18 @@ public void visitAnyProperty(Clazz clazz,
indent();
println();
print("// Synthetic method for delegate: ", true);
print(ClassUtil.externalFullMethodDescription(
clazz.getName(),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getAccessFlags(),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getName(clazz),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getDescriptor(clazz)));
if (kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod == null)
{
print("unknown");
}
else
{
print(ClassUtil.externalFullMethodDescription(
clazz.getName(),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getAccessFlags(),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getName(clazz),
kotlinPropertyMetadata.referencedSyntheticMethodForDelegateMethod.getDescriptor(clazz)));
}
outdent();
}

Expand Down

0 comments on commit f5f04c5

Please sign in to comment.