Spring Framework
  1. Spring Framework
  2. SPR-3688

The bean() PCD doesn't work when used in reference pointcut in @AspectJ aspect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1 M3
    • Fix Version/s: 2.5.4
    • Component/s: Core:AOP
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      When used in a reference pointcut the bean() PCD doesn't work. AspectJ (specifically, PatternParser.parseReferencePointcut() called by parseSinglePointcut()) treats bean() is a similar way to this(), target(), @target() etc. and tries to validate the argument to bean() as a type. Obviously, it can't find a matching type and ends up throwing an exception.

      The test code for the bug is in BeanNamePointcutAtAspectTests (currently commented out).

        Activity

        Hide
        Juergen Hoeller added a comment -

        According to the recent discussion, I understand that this is an AspectJ bug rather than a Spring bug? So we have to wait for an AspectJ update here... hence I'm scheduling this for 2.2 instead, since the 2.1 release won't be able to wait on this.

        Juergen

        Show
        Juergen Hoeller added a comment - According to the recent discussion, I understand that this is an AspectJ bug rather than a Spring bug? So we have to wait for an AspectJ update here... hence I'm scheduling this for 2.2 instead, since the 2.1 release won't be able to wait on this. Juergen
        Hide
        Juergen Hoeller added a comment -

        Ramnivas, what's the status of this? Any AspectJ update in sight?

        Juergen

        Show
        Juergen Hoeller added a comment - Ramnivas, what's the status of this? Any AspectJ update in sight? Juergen
        Hide
        Ramnivas Laddad added a comment -

        Andy was able to fix the problem. However, the fix was too invasive and hence needs revisiting (currently marked for 1.6)

        Here is AspectJ bug for reference:
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=205907

        Show
        Ramnivas Laddad added a comment - Andy was able to fix the problem. However, the fix was too invasive and hence needs revisiting (currently marked for 1.6) Here is AspectJ bug for reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=205907
        Hide
        Andy Clement added a comment -

        Bug 205907 in AspectJ is now fixed. That fix addresses this Spring problem (I've tested and confirmed the fix works). The fix will be in the AspectJ 1.6.0rc1 weaver jar.

        Show
        Andy Clement added a comment - Bug 205907 in AspectJ is now fixed. That fix addresses this Spring problem (I've tested and confirmed the fix works). The fix will be in the AspectJ 1.6.0rc1 weaver jar.
        Hide
        Ramnivas Laddad added a comment -

        AspectJ updated to AspectJ 6 (aspectj-DEVELOPMENT-20080321160506). Will eventually update to final AspectJ version when it is available.
        Verified the fix and updated the failing testcases.

        Show
        Ramnivas Laddad added a comment - AspectJ updated to AspectJ 6 (aspectj-DEVELOPMENT-20080321160506). Will eventually update to final AspectJ version when it is available. Verified the fix and updated the failing testcases.

          People

          • Assignee:
            Ramnivas Laddad
            Reporter:
            Ramnivas Laddad
            Last updater:
            Trevor Marshall
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 5 weeks, 3 days ago