Fix annotation processor builder setter detection

Update TypeElementMembers to correctly detect builder style setters.
The previous logic could fail because of the crazy way that TypeMirror
implements its equals() method.

Fixes gh-1859
See gh-1854
pull/1872/head
Phillip Webb 10 years ago
parent 143a62b6bf
commit e902f6b91d

@ -95,8 +95,9 @@ class TypeElementMembers {
}
private boolean isSetterReturnType(ExecutableElement method) {
return (TypeKind.VOID == method.getReturnType().getKind() || method
.getEnclosingElement().asType().equals(method.getReturnType()));
return (TypeKind.VOID == method.getReturnType().getKind() || this.env
.getTypeUtils().isSameType(method.getEnclosingElement().asType(),
method.getReturnType()));
}
private String getAccessorName(String methodName) {

Loading…
Cancel
Save