Skip to content

Commit d94e994

Browse files
committed
Broaden exclusion criteria for “as” method in RequestManagerGenerator.
We’re being overly specific. At least for now, there’s only one “as” method so we can exclude it based on the name alone. Addresses bumptech#1971.
1 parent 8419b90 commit d94e994

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

annotation/compiler/src/main/java/com/bumptech/glide/annotation/compiler/RequestManagerGenerator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,7 @@ private List<MethodSpec> generateRequestManagerMethodOverrides() {
170170
@Override
171171
public boolean apply(ExecutableElement input) {
172172
// Skip the <T> as(Class<T>) method.
173-
return !input.getSimpleName().toString().equals("as")
174-
|| input.getParameters().size() != 1
175-
|| !processingEnv.getTypeUtils().isAssignable(
176-
input.getParameters().get(0).asType(), rawClassType);
173+
return !input.getSimpleName().toString().equals("as");
177174
}
178175
})
179176
.transform(new Function<ExecutableElement, MethodSpec>() {

0 commit comments

Comments
 (0)