[
https://issues.apache.org/jira/browse/ARIES-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200565#comment-13200565
]
David Jencks commented on ARIES-819:
------------------------------------
This requires more work. Eric Bruneton (asm developer) pointed out:
The case of equal types should not happen, since it is
already handled in Frame.java:1380. Anyway, it is easy to
test in an overriden method, like the java/lang/Object case.
Finally, if one type is the class C being written, it is not
valid to move directly to C's superclass. Indeed, if the
other type is a subclass of C, getCommonSuperClass should
return C.
-----
I think this means we can just override the getCommonSuperclass method and not
worry about the case where one of the classes is the class being enhanced, but
I haven't looked at it in detain yet.
> OsgiFriendlyClassWriter.getCommonSuperClass appears to have some errors.
> ------------------------------------------------------------------------
>
> Key: ARIES-819
> URL: https://issues.apache.org/jira/browse/ARIES-819
> Project: Aries
> Issue Type: Bug
> Components: Proxy
> Affects Versions: proxy.impl-0.4
> Reporter: David Jencks
> Assignee: David Jencks
> Fix For: proxy.impl-0.4.1
>
>
> problems seen:
> - the shortcut to superclass when a type is the currently-being-written class
> doesn't return the evaluated result. This could result in trying to load the
> class being written anyway.
> - if one of the types is an interface, the answer has to be java.lang.Object,
> so we can return that immediately. The current code will throw an exception
> if both types are interfaces.
> In addition, I've opened an asm issue to move the special case evaluations
> to a new internalGetCommonSuperClass method so we wouldn't have to track
> class name and superclass name ourselves.
> http://forge.ow2.org/tracker/index.php?func=detail&aid=316320&group_id=23&atid=350023
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira