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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user