Skip to content

Commit a4b81ed

Browse files
pkxiuluoyanpengyanpengJakeWharton
authored
igonre "isSynthetic" method when eagerly validating (#3864)
* igonre "isSynthetic" method when eagerly validating * Update retrofit/src/main/java/retrofit2/Retrofit.java --------- Co-authored-by: yanpengyanpeng <[email protected]> Co-authored-by: Jake Wharton <[email protected]>
1 parent ab46542 commit a4b81ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

retrofit/src/main/java/retrofit2/Retrofit.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ private void validateServiceInterface(Class<?> service) {
191191
if (validateEagerly) {
192192
Platform platform = Platform.get();
193193
for (Method method : service.getDeclaredMethods()) {
194-
if (!platform.isDefaultMethod(method) && !Modifier.isStatic(method.getModifiers())) {
194+
if (!platform.isDefaultMethod(method)
195+
&& !Modifier.isStatic(method.getModifiers())
196+
&& !method.isSynthetic()) {
195197
loadServiceMethod(service, method);
196198
}
197199
}

0 commit comments

Comments
 (0)