[
http://jira.jboss.com/jira/browse/JASSIST-58?page=comments#action_12404198 ]
Shigeru Chiba commented on JASSIST-58:
--------------------------------------
This is not a bug. It's spec. The internal compiler of Javassist
only supports JDK 1.4.
The if statements you found above are for type checking.
Your suggestion will break the type checker and produce
broken bytecode. To fix the problem, we must largely extend
the code generator to support JDK 1.5 (or at least boxing/unboxing).
Complie error on autoboxing
---------------------------
Key: JASSIST-58
URL:
http://jira.jboss.com/jira/browse/JASSIST-58
Project: Javassist
Issue Type: Bug
Reporter: Guy Korland
Assigned To: Shigeru Chiba
e.g.
1. call the following method: void foo(Object obj) as foo(1) causes compile error.
2. casting a primitive to Object causes a compile error e.g.: (Object )1.
The first error is caused by the MemberResolver.compareSignature() line 220:
if (j < 0 || argTypes[n] != CLASS)
return NO;
Should be changed to
if (j < 0)
return NO;
The second error caused by CodeGen line 1395:
if (type == CLASS)
Should be removed
--
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