MethodTuple Constructor Arguments
"Shields, John (HQP)" <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.devel |
|---|---|
| Message-ID | <1641BB0AA7287848817A63C3EE9677D526490C@hqp-ex-mb05.na.msds.rhi.com> |
Hello, I figured this one is more suited to the developer list than the user list, but please let me know if you'd rather the user list or JIRA. I noticed that in my aspects using the MethodSignature.getMethod() method returns the prefixed AW method, not the original method like I'd expect. If I change it to use ((MethodSignatureImpl)signature).getMethodTuple().getWrapperMethod(), then I get the original method. I noticed that in AspectRegistry, there is a comment that reads "// create a method tuple with 'wrapped method' and 'prefixed method'" just before creating the MethodTuple. In the MethodTuple constructor, I noticed that the second parameter is named "originalMethod". The AspectRegistry therefore passes a parameter named "prefixedMethod" to the constructor that calls it "originalMethod". I think that this is backwards. I think there is some confusion regarding the variable names. The comment refers to a "wrapped method" but the variable is named "wrapperMethod"... However, when I make the "fix" in my version, I end up with a StackOverflowError because the original method gets called recursively. I started to track down the error but thought I'd post this first since it may be something simple for you guys to fix. I also noticed a comment about Cflow being broken by JIT and thought that maybe this could be related... Regards, John