Open
Description
when looking for super type of a type we try to resolve the canonical name of that type.
the issue is that we are trying to resolve wildcard imports before checking in the current package first.
example of the issue:
package org.jboss.forge.grammar.java;
import java.net.http.*;
import java.util.*;
public class MockWildcardClass {
public List<String> getList(){
return new ArrayList<>();
}
public HttpRequest getHttpRequest(){
return new HttpRequest();
}
}
and in the same package:
package org.jboss.forge.grammar.java;
public class HttpRequest {
private String fakeField;
public String getFakeField() {
return fakeField;
}
public <T extends HttpRequest> T setFakeField(String fakeField) {
this.fakeField = fakeField;
return (T) this;
}
}
roaster resolves HttpRequest
as java.net.http.HttpRequest
even though it should be org.jboss.forge.grammar.java.HttpRequest
Metadata
Metadata
Assignees
Labels
No labels