Bug 40858 - super-qualified pointcut reference cause weaver stack trace
Summary: super-qualified pointcut reference cause weaver stack trace
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: 1.1.1   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 41121 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-28 14:15 EDT by Wes Isberg CLA
Modified: 2003-08-28 06:38 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2003-07-28 14:15:52 EDT
"super.{pointcut}(..)" causes the weaver to throw an exception:

org.aspectj.weaver.BCException: Bad type signature: <missing>
at org.aspectj.weaver.TypeX.signatureToName(TypeX.java:565)
at org.aspectj.weaver.TypeX.getName(TypeX.java:205)
...

The "super" is unnecessary since the pointcut is implicitly qualified by the
enclosing type, so it can be removed to avoid the stack trace.

Find test case in modules/tests/bugs/SuperPointcutCE.java
Comment 1 Wes Isberg CLA 2003-07-28 15:14:08 EDT
Sorry, workaround of removing "super" is wrong in cases where the pointcut is
being redefined in the current aspect.  In this case, the workaround is to
specify the super-type instead:
  from: super.pc()
    to: AA.pc()
 where: AA is the relevant supertype
Comment 2 Jim Hugunin CLA 2003-08-04 14:40:29 EDT
super is not allowed in pointcut definitions in AspectJ-1.0 or 1.1.  It seems
like a reasonable thing to ask for in 1.2.

However, having a stack trace for any unknown type name in this position is
terrible and easily fixed.  This is now fixed in the tree for 1.1.1.

(Note: This bug will be actually marked fixed (and P2) when I get my eclipse
account to work with my new email)
Comment 3 Jim Hugunin CLA 2003-08-04 20:22:30 EDT
FIXED
Comment 4 Unknown User CLA 2003-08-05 17:09:40 EDT
*** Bug 41121 has been marked as a duplicate of this bug. ***