Project: AspectJ
Bug 155972 NullPointerException in ConstructorSignature.getConstructor()
Reported: 2006-09-01 08:45:05 | Status: resolved fixed

AspectJ version: 1.5.3.200608290814 When advising a constructor, we can do the following to obtain the constructor as a java.lang.reflect.Member: Member cons = ((ConstructorSignature) thisJoinPointStaticPart .getSignature()).getConstructor(); however that sometimes fails, and returns null.

Files changed in fix:
runtime/src/org/aspectj/runtime/reflect/ConstructorSignatureImpl.java runtime/src/org/aspectj/runtime/reflect/FieldSignatureImpl.java runtime/src/org/aspectj/runtime/reflect/InitializerSignatureImpl.java tests/bugs153/pr155972/ConstructorTest.java tests/bugs153/pr155972/FieldTest.java tests/bugs153/pr155972/InitializerTest.java tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java