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

Adding kotlin property to (extension) interface yields IllegalArgumentException on invocation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0 GA (Kay)
    • Component/s: None
    • Labels:
      None

      Description

      interface RouteRepository :
              JpaRepository<MstRoute, Long>,
              QuerydslPredicateExecutor<MstRoute>,
              RouteRepositoryExtension
      

      where RouteRepositoryExtension contains a (read-only) kotlin property will yield

      java.lang.IllegalArgumentException: Cannot resolve method 'getFindRouteQuery' parameter -1 to a Kotlin function!
      	at org.springframework.data.util.ReflectionUtils.isNullable(ReflectionUtils.java:409) ~[spring-data-commons-2.0.0.RELEASE.jar:2.0.0.RELEASE]
      	at org.springframework.data.repository.core.support.MethodInvocationValidator$Nullability.isNullableParameter(MethodInvocationValidator.java:157) ~[spring-data-commons-2.0.0.RELEASE.jar:2.0.0.RELEASE]
      	at org.springframework.data.repository.core.support.MethodInvocationValidator$Nullability.of(MethodInvocationValidator.java:118) ~[spring-data-commons-2.0.0.RELEASE.jar:2.0.0.RELEASE]
      	at org.springframework.data.repository.core.support.MethodInvocationValidator.invoke(MethodInvocationValidator.java:80) ~[spring-data-commons-2.0.0.RELEASE.jar:2.0.0.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.0.RELEASE.jar:5.0.0.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.0.0.RELEASE.jar:5.0.0.RELEASE]
      	at com.sun.proxy.$Proxy115.getFindRouteQuery(Unknown Source) ~[na:na]
      

      when invoked.

        Attachments

          Activity

            People

            Assignee:
            mp911de Mark Paluch
            Reporter:
            masc3d Marco
            Last updater:
            Oliver Drotbohm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: