mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
Use return type of ExecutableElement. Fixes #2296
This commit is contained in:
parent
2bf234caf7
commit
3618ef007d
@ -113,7 +113,12 @@ public class JPAConfiguration extends DefaultConfiguration {
|
||||
}
|
||||
if (mirror != null) {
|
||||
TypeMirror typeArg = TypeUtils.getAnnotationValueAsTypeMirror(mirror, "targetEntity");
|
||||
TypeMirror erasure = types.erasure(element.asType());
|
||||
TypeMirror erasure;
|
||||
if (element instanceof ExecutableElement) {
|
||||
erasure = ((ExecutableElement) element).getReturnType();
|
||||
} else {
|
||||
erasure = types.erasure(element.asType());
|
||||
}
|
||||
TypeElement typeElement = (TypeElement) types.asElement(erasure);
|
||||
if (typeElement != null && typeArg != null) {
|
||||
if (typeElement.getTypeParameters().size() == 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user