[
https://issues.jboss.org/browse/ROASTER-121?page=com.atlassian.jira.plugi...
]
plamen petkov edited comment on ROASTER-121 at 2/22/17 9:22 AM:
----------------------------------------------------------------
If you give me a couple of pointers, I'll be glad to take a look and fix this issue.
Because you are working with JDT under the hood, I was looking through the
"[addUnimplementedMethods|https://github.com/eclipse/eclipse.jdt.ui/blob/89da2ef66b1fced4c1d4ff81ea9622ada9841256/org.eclipse.jdt.ui/core%20extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java#L67]"
implementation that eclipse is using and I might be able to figure out how to move the
logic
was (Author: plamen5kov):
If you give me a couple of pointers, I'll be glad to take a look and fix this issue.
Because you are working with JDT under the hood, I was looking through the
"[addUnimplementedMethods|https://github.com/eclipse/eclipse.jdt.ui/blob/89da2ef66b1fced4c1d4ff81ea9622ada9841256/org.eclipse.jdt.ui/core%20extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java#L67]"
implementation that eclipse is using and if I might be able to figure out how to move the
logic
Overridden interface has wrong signature
----------------------------------------
Key: ROASTER-121
URL:
https://issues.jboss.org/browse/ROASTER-121
Project: Roaster
Issue Type: Bug
Components: JDT
Affects Versions: 2.19.4.Final
Reporter: plamen petkov
When you implement an interface that extends another interface that has generic
parameters, these parameters are not taken into account, when generating the signature of
the overridden method. Will explain more in the steps to reproduce.
Having:
{code:java}
abstract class A {
public interface Iface1<T extends A> {
void doSomething(T smth);
}
}
public classs C {
public interface Iface2 extends A.Iface1<C.D> {
}
public class D extends A{
}
}
{code}
Now when we implement C.Iface2 we should get the method with signature:
_public void doSomething(C.D smth)_,
as C.D is specified for the generic type, but instead we get:
_public void doSomething(A smth)_
which is wrong because class A is abstract for one, and type erasure was not done right
because otherwise the method signature would have the right type of parameters.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)