https://kotlinlang.org logo
#android
Title
# android
m

myanmarking

06/17/2019, 9:59 AM
Copy code
public void clearView(@NotNull RecyclerView recyclerView, @NotNull ViewHolder viewHolder) {
      Intrinsics.checkParameterIsNotNull(recyclerView, "recyclerView");
      Intrinsics.checkParameterIsNotNull(viewHolder, "viewHolder");
      super.clearView(recyclerView, viewHolder);
      ...
   }
t

tseisel

06/17/2019, 11:54 AM
Because
clearView
parameters are annotated with
@NonNull
, the Kotlin compiler overrides then as non-null. For Java interop, any function that can be called from Java code is protected by those
intrinsics
checks. Maybe you could file a bug for that AndroidX library, as the non-null constract is violated. As a workaround, try setting those parameters as nullable in Kotlin: this should remove the intrinsics checks.
5 Views