Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-3403

AOP Around bug causes stack error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.2.0.RELEASE
    • Fix Version/s: 3.3.0.RELEASE
    • Component/s: None
    • Labels:
    • Environment:
      Mac OS X 10.8.3

      Description

      (I'm not sure if this is the correct place to report this bug. My apologies if that is the case).

      I have some trouble with an Around pointcut when using the annotation style:

      @Around("doBeforeDivide(nominator, denominator)")
      public Object doWhenDenominatorZero(ProceedingJoinPoint pjp, double nominator, double denominator) {
      return pjp.proceed(new Object[]

      {nominator, denominator==0?1.0:denominator}

      );
      }

      Causes a stack error:
      class: edu/artesis/aop/CalculatorImpl, method: divide signature: (DD)D) Expecting to find double on stack

      However, it works fine when not using the annotation style:

      Object around(double nominator, double denominator) : doBeforeDivide(nominator, denominator){
      return proceed(nominator, denominator==0?1.0:denominator);
      }

      Any idea what could be causing this?

        Attachments

          Activity

            People

            Assignee:
            aclement Andy Clement
            Reporter:
            jimbauwens Jim Bauwens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: