Skip to content

Commit

Permalink
igonre "isSynthetic" method when eagerly validating (#3864)
Browse files Browse the repository at this point in the history
* igonre "isSynthetic" method when eagerly validating

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

---------

Co-authored-by: yanpengyanpeng <yanpengyanpeng@didichuxing.com>
Co-authored-by: Jake Wharton <github@jakewharton.com>
  • Loading branch information
3 people authored Jan 2, 2024
1 parent ab46542 commit a4b81ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion retrofit/src/main/java/retrofit2/Retrofit.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ private void validateServiceInterface(Class<?> service) {
if (validateEagerly) {
Platform platform = Platform.get();
for (Method method : service.getDeclaredMethods()) {
if (!platform.isDefaultMethod(method) && !Modifier.isStatic(method.getModifiers())) {
if (!platform.isDefaultMethod(method)
&& !Modifier.isStatic(method.getModifiers())
&& !method.isSynthetic()) {
loadServiceMethod(service, method);
}
}
Expand Down

0 comments on commit a4b81ed

Please sign in to comment.