Browse Source

BcelWorld.reportMatch: handle 'kind.getName() == null' correctly

Fixes #153.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_19
Alexander Kriegisch 2 years ago
parent
commit
238af52f84
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java

+ 7
- 5
weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java View File

@@ -130,11 +130,13 @@ public class BcelWorld extends World implements Repository {
@Override
public void reportMatch(ShadowMunger munger, Shadow shadow) {
if (getCrossReferenceHandler() != null) {
getCrossReferenceHandler().addCrossReference(munger.getSourceLocation(), // What is being applied
shadow.getSourceLocation(), // Where is it being applied
determineRelKind(munger).getName(), // What kind of advice?
((Advice) munger).hasDynamicTests() // Is a runtime test being stuffed in the code?
);
final IRelationship.Kind kind = determineRelKind(munger);
getCrossReferenceHandler().addCrossReference(
munger.getSourceLocation(), // What is being applied?
shadow.getSourceLocation(), // Where is it being applied?
kind == null ? null : kind.getName(), // What kind of advice?
((Advice) munger).hasDynamicTests() // Is a runtime test being stuffed in the code?
);
}

if (!getMessageHandler().isIgnoring(IMessage.WEAVEINFO)) {

Loading…
Cancel
Save