Skip to content
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

Fix a crash when combining generics and records #1442

Merged
merged 1 commit into from Dec 4, 2021

Commits on Dec 4, 2021

  1. Fix a crash when combining generics and records

    Without the fix the test fails like so:
    
        No JsonAdapter for T (with no annotations)
        for T
        for java.util.List<T>
        for com.squareup.moshi.records.RecordsTest$IndirectGenerics<java.lang.Long>
        for class com.squareup.moshi.records.RecordsTest$HasIndirectGenerics
        java.lang.IllegalArgumentException: No JsonAdapter for T (with no annotations)
        for T
        for java.util.List<T>
        for com.squareup.moshi.records.RecordsTest$IndirectGenerics<java.lang.Long>
        for class com.squareup.moshi.records.RecordsTest$HasIndirectGenerics
          at com.squareup.moshi.Moshi$LookupChain.exceptionWithLookupStack(Moshi.java:389)
          at com.squareup.moshi.Moshi.adapter(Moshi.java:158)
          at com.squareup.moshi.Moshi.adapter(Moshi.java:106)
          at com.squareup.moshi.Moshi.adapter(Moshi.java:75)
    swankjesse committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    1cb15e3 View commit details
    Browse the repository at this point in the history