[jboss-jira] [JBoss JIRA] Updated: (JASSIST-127) interface proxy creation fails if there are methods with covariant return types
Paul Pogonyshev (JIRA)
jira-events at lists.jboss.org
Thu Aug 18 08:36:18 EDT 2011
[ https://issues.jboss.org/browse/JASSIST-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Pogonyshev updated JASSIST-127:
------------------------------------
Attachment: jassist-127-fix.diff
I finally got around to writing a proper fix for this. There are comments in the patch to explain it.
Unfortunately, to test the bug you need Java 1.5, therefore I disabled the added test. If you want to test it, make sure "1.4" strings are replaced with "1.5" in 'pom.xml' file. I did this to make sure that the changes in 'ProxyFactory.java' indeed solve the bug.
> interface proxy creation fails if there are methods with covariant return types
> -------------------------------------------------------------------------------
>
> Key: JASSIST-127
> URL: https://issues.jboss.org/browse/JASSIST-127
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.12.0.GA
> Environment: Java 1.6.
> Reporter: Paul Pogonyshev
> Assignee: Shigeru Chiba
> Attachments: jassist-127-fix.diff
>
>
> Creation of proxy class for interface Bar fails:
> public interface Foo
> {
> Foo getSelf ();
> }
> public interface Bar extends Foo
> {
> Bar getSelf ();
> }
> This is because of covariant return types of method getSelf(). However, as this is permitted by the language (i.e. subtype can restrict the return type further), I consider this a bug.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list