Skip to content

Allow non-exact argument type matching for DynamicProxyable. #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

mikereiche
Copy link
Collaborator

Allow non-exact (isAssignableFrom) argument matching for methods called by DyanmicProxyable. If there are exactly two candidates, and one returns an Iterable and the other returns a List, use the method that returns the List. This is due to
CouchbaseRepository defining findAll() methods as List<?>, while PagingAndSortyRepository defines findAll() to return an Iterable. This needs to be addressed separately.

Closes #1818.

@mikereiche mikereiche force-pushed the datacouch_1818_dynamic_proxyable_non_exact_argument_types branch from de8a888 to c0a0d48 Compare September 12, 2023 02:08
Allow non-exact (isAssignableFrom) argument matching for methods
called by DyanmicProxyable. If there are exactly two candidates,
and one returns an Iterable and the other returns a List, use
the method that returns the List.  This is due to
CouchbaseRepository defining findAll() methods as List<?>, while
PagingAndSortyRepository defines findAll() to return an Iterable.
This needs to be addressed separately.

Closes #1818.
@mikereiche mikereiche force-pushed the datacouch_1818_dynamic_proxyable_non_exact_argument_types branch from c0a0d48 to 2e72453 Compare September 12, 2023 02:09
@mikereiche mikereiche merged commit 62bee5c into main Sep 12, 2023
mikereiche added a commit that referenced this pull request Sep 14, 2023
Allow non-exact (isAssignableFrom) argument matching for methods
called by DyanmicProxyable. If there are exactly two candidates,
and one returns an Iterable and the other returns a List, use
the method that returns the List.  This is due to
CouchbaseRepository defining findAll() methods as List<?>, while
PagingAndSortyRepository defines findAll() to return an Iterable.
This needs to be addressed separately.

Closes #1818.
mikereiche added a commit that referenced this pull request Sep 14, 2023
Allow non-exact (isAssignableFrom) argument matching for methods
called by DyanmicProxyable. If there are exactly two candidates,
and one returns an Iterable and the other returns a List, use
the method that returns the List.  This is due to
CouchbaseRepository defining findAll() methods as List<?>, while
PagingAndSortyRepository defines findAll() to return an Iterable.
This needs to be addressed separately.

Closes #1818.
@mikereiche mikereiche deleted the datacouch_1818_dynamic_proxyable_non_exact_argument_types branch January 18, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

paging doesn't work with DynamicProxy - gives NoSuchMethodError if args to exactly match.
1 participant