Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1023

Redeclared reactive delete(Serializable) results in wrong method overload to be invoked eventually

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0 M1 (Kay)
    • Fix Version/s: 2.0 M2 (Kay)
    • Component/s: Repositories
    • Labels:
      None
    • Sprint:
      Kay M2

      Description

      Redeclaring an overloaded method might invoke another existing method because of parameter assignability.

      Consider following repository declaration:

      interface RxJava2ConvertingRepository extends Repository<Object, Long> {
      
      	Completable delete(Serializable id);
      }
      

      backed by a repository ReactiveSortingRepository<Object, Serializable>.

      Invoking delete(serializable) may execute delete(Object), declared in the backing repository instead of delete(serializable).

      Method selection does not consider direct matches but relies on the order of Class.getMethods to verify parameter assignability.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              mp911de Mark Paluch
              Last updater:
              Mark Paluch
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: