[jboss-jira] [JBoss JIRA] Commented: (JBAOP-731) problem with javac->aopc->javac sequence
Konstantin Sobolev (JIRA)
jira-events at lists.jboss.org
Thu May 21 19:35:56 EDT 2009
[ https://jira.jboss.org/jira/browse/JBAOP-731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12468771#action_12468771 ]
Konstantin Sobolev commented on JBAOP-731:
------------------------------------------
I've managed to disassemble POJO (POJO1) into Jasmin bytecode (http://jasmin.sourceforge.net/) and then compile it back. Now javac yells at
POJO2.java:1: POJO2 is not abstract and does not override abstract method _setInstanceAdvisor(org.jboss.aop.InstanceAdvisor) in org.jboss.aop.InstanceAdvised
public class POJO2 extends POJO
which looks much more reasonable. You can check out yourself, even the original javac-produced POJO.class doesn't implement _setInstanceAdvisor.
It's interesting that this method implementation doesn't get inserted at all, but by some reason javac doesn't implain if POJO(1) isn't declared abstract, I guess they don't check if all method implementations are in place in this case.
So I believe there're 2 bugs here, one probably caused by a bug in javassist, another - missing _setInstanceAdvisor.
> problem with javac->aopc->javac sequence
> ----------------------------------------
>
> Key: JBAOP-731
> URL: https://jira.jboss.org/jira/browse/JBAOP-731
> Project: JBoss AOP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.1.GA
> Environment: JDK 1.6.0_13/32bit
> Reporter: Konstantin Sobolev
> Attachments: bug.tar.gz
>
>
> I'm trying to switch from JBossAOP 1.5.6 to 2.1.1 and can't build my project, looks like there are some problems with aop-compiled classes. Here's what happens: first we build our interface classes, let's say there's *abstract* POJO1 among them. Then we run AopC on them, and it modifies POJO1.class
> Then we compile some more classes, and there's non-abstract POJO2 there, which extends POJO1. At this time javac fails with this message:
> POJO2 is not abstract and does not override abstract method _getAdvisor() in org.jboss.aop.Advised
> javap shows that POJO1 now implements Advisable and indeed contains _getAdvisor() method, but this method is not abstract! I'm confused.
> Running AopC after compiling all of the classes works fine. Making POJO1 non-abstract also makes javac happy.
> I'm attaching a testcase. Unpack it into jboss-aop-2.1.1.GA/docs/aspect-framework/examples/bug and run ant there to reproduce the problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list