[
http://jira.jboss.com/jira/browse/JASSIST-60?page=comments#action_12411235 ]
Yanic Inghelbrecht commented on JASSIST-60:
-------------------------------------------
Hi Chiba,
Were you able to reproduce this bug?
I'm also wondering if you have any idea about a possible time frame for a solution,
I'm very keen on seeing this fixed. Let me know if I can do anything to help.
Best regards,
Yanic
VerifyError : Bad access to protected data
------------------------------------------
Key: JASSIST-60
URL:
http://jira.jboss.com/jira/browse/JASSIST-60
Project: Javassist
Issue Type: Bug
Environment: Javassist 3.7.1 (latest from cvs HEAD)
Eclipse Version: 3.3.1.1, Build id: M20071023-1652 running in the JRE included with
JDK1.6.0_03 on winXP and compiler compliance set to 5.0.
Reporter: Yanic Inghelbrecht
Assigned To: Shigeru Chiba
Attachments: test_protected_and_bad_access.zip
While running some javassist instrumentation on JHotDraw, I ran into the issue described
below
The code (attached in the follow-up post) is the simplest testcase I could find and
causes the following exception when executed :
Exception in thread "main" java.lang.VerifyError: (class:
test_protected_and_bad_access/Client, method: doit signature:
(Ltest_protected_and_bad_access/Circle;)V) Bad access to protected data
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at test_protected_and_bad_access.Main.main(Main.java:31)
The testcase uses clone() to demonstrate the bug.
Some things I've noticed that when the formal parameter of Client#doit(Circle) is
changed from Circle to Figure, the error disappears (i.e. the two interface levels seem to
matter).
In the JHotDraw setup, adding a "public Object clone();" to the Circle
interface is a work-around for this bug, although it doesn't seem to work in the
attached testcase : when I add it, it results in a NoSuchMethodError for
client#doit(Circle) when javassist loads the Client class (which is very trange since that
class was not touched). If the same modification is made but the class is loaded with
"regular reflection", the method is found alright, so perhaps this is a
javassist bug as well?
Thanks in advance for a quick response.
Best regards,
Yanic
--
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