[jboss-user] [JBoss AOP] - Re: Aspect scope and construction pointcuts

chrismeadows do-not-reply at jboss.com
Fri Nov 3 05:15:24 EST 2006


Hi there,

I've pulled and built the 1_5_0 branch, but still get the same problem. I've been having a look at the source and believe the casue of the problem is in org.jboss.aop.advice.AbstractAdvice#resolveAdvice(Invocation)

The code I see states


  | ...
  |       if (invocation instanceof ConstructorInvocation)
  |       {
  |          if (constructorAdvice == null)
  |          {
  |             throw new IllegalStateException("Unable to resolve ConstructorInvocation advice " + getName());
  |          }
  |          return constructorAdvice;
  |       }
  |       if (invocation instanceof ConstructionInvocation)
  |       {
  |          if (constructorAdvice == null)
  |          {
  |             throw new IllegalStateException("Unable to resolve ConstructionInvocation advice " + getName());
  |          }
  |          return constructorAdvice;
  |       }
  | 
  | ...
  | 

This looks like copy-and-pastification. Should it be...


  | ...
  |       if (invocation instanceof ConstructorInvocation)
  |       {
  |          if (constructorAdvice == null)
  |          {
  |             throw new IllegalStateException("Unable to resolve ConstructorInvocation advice " + getName());
  |          }
  |          return constructorAdvice;
  |       }
  |       if (invocation instanceof ConstructionInvocation)
  |       {
  |          if (constructionAdvice == null) // construction, not constructor
  |          {
  |             throw new IllegalStateException("Unable to resolve ConstructionInvocation advice " + getName());
  |          }
  |          return constructionAdvice; // construction, not constructor
  |       }
  | 
  | ...
  | 

is this the fix from yesterday? If so, I'm not seeing it in the pull of the 1_5_0 branch :(


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982906#3982906

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982906



More information about the jboss-user mailing list