Commit e902f6b9 authored by Phillip Webb's avatar Phillip Webb

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
parent 143a62b6
...@@ -95,8 +95,9 @@ class TypeElementMembers { ...@@ -95,8 +95,9 @@ class TypeElementMembers {
} }
private boolean isSetterReturnType(ExecutableElement method) { private boolean isSetterReturnType(ExecutableElement method) {
return (TypeKind.VOID == method.getReturnType().getKind() || method return (TypeKind.VOID == method.getReturnType().getKind() || this.env
.getEnclosingElement().asType().equals(method.getReturnType())); .getTypeUtils().isSameType(method.getEnclosingElement().asType(),
method.getReturnType()));
} }
private String getAccessorName(String methodName) { private String getAccessorName(String methodName) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment