[
http://jira.jboss.com/jira/browse/JBAOP-481?page=comments#action_12387355 ]
Kabir Khan commented on JBAOP-481:
----------------------------------
It should be an exact copy of the old method. Taken from
GeneratedAdvisorMethodExecutionTransformer.java
We basically copy trans.getMethod() (processRequest()) to wmethod
(HotlinksProcessor$processRequest$aop())
protected void transformMethod(MethodTransformation trans, boolean wrap)
throws CannotCompileException, NotFoundException
{
// generate Wrapper
String wrappedName = ClassAdvisor.notAdvisedMethodName(trans.getClazzName(),
trans.getMethod().getName());
CtMethod wmethod = CtNewMethod.copy(trans.getMethod(), trans.getClazz(), null);
String originalName = trans.getOriginalName();
wmethod.setName(wrappedName);
trans.getClazz().addMethod(wmethod);
moveAnnotationsAndCopySignature(trans.getMethod(), wmethod);
trans.getMethod().setName(wrappedName);
wmethod.setName(originalName);
trans.setWMethod(wmethod, wrappedName);
String methodInfoField = addMethodInfoFieldToGenAdvisor(trans);
addMethodToGeneratedAdvisor(trans, methodInfoField);
// prepareForWrapping
getWrapper().prepareForWrapping(wmethod,
WrapperTransformer.SINGLE_TRANSFORMATION_INDEX);
if (wrap)
{
// wrap
getWrapper().wrap(wmethod, WrapperTransformer.SINGLE_TRANSFORMATION_INDEX);
// executeWrapping
setWrapperBody(trans, methodInfoField);
}
}
Illegal constant pool index
---------------------------
Key: JBAOP-481
URL:
http://jira.jboss.com/jira/browse/JBAOP-481
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 1.5.3.GA, 1.5.6.GA
Environment: jdk 1.6.0
Reporter: Konstantin Sobolev
Attachments: bug.tar.gz, bug_with_classes.zip
aopc-instrumented classes appear broken from time to time:
[java] java.lang.VerifyError: (class: HotlinksProcessor, method:
HotlinksProcessor$processRequest$aop signature:
(Ljavax/servlet/http/HttpServletRequest;Z)Lcom/supportwizard/gui2/beans/hotlinks/HotlinkForm;)
Illegal constant pool index
This problem was reported several times:
http://www.jboss.org/?module=bb&op=viewtopic&t=102893
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848973#...
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009744#...
Now I'm attaching a testcase which allows to reproduce it. Unpack into
jboss-aop_1.5.6.GA and to 'ant run'.
Commenting out almost any line, for instance HotlinksProcessor.java:21 'fixes'
the problem.
Using javassist.jar from 2.0.0-beta2 doesn't help, although the bug is not active
there.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira