Defer non-interface methods to normal invocation. #132

Merged
merged 1 commit into from Dec 20, 2012

Conversation

2 participants
Collaborator

JakeWharton commented Dec 20, 2012

Closes #130

retrofit/src/main/java/retrofit/http/RestAdapter.java
}
private class RestHandler implements InvocationHandler {
- final Map<Method, MethodDetails> methodDetailsCache =
+ private final Type declaringType;
@swankjesse

swankjesse Dec 20, 2012

Owner

use Class<?> here. Otherwise somebody might accidentally pass a parameterized type, and that'll never work in comparison against getDeclaringClass().

Owner

swankjesse commented Dec 20, 2012

LGTM

You'll have problems if your users have service interfaces that extend other service interfaces. But that's bogus and shouldn't be supported anyway.

JakeWharton added a commit that referenced this pull request Dec 20, 2012

Merge pull request #132 from square/jw/defer
Defer non-interface methods to normal invocation.

@JakeWharton JakeWharton merged commit f54d6ad into master Dec 20, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment