Skip to content

RuntimeTypeAdapterFactory depends on internal API (JPMS, Java 9+) #1931

@miasma

Description

@miasma

The RuntimeTypeAdapterFactory code example (https://github.com/google/gson/blob/master/extras/src/main/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactory.java) depends on the internal API class com.google.gson.internal.Streams, which is not exported when depending on gson in a JPMS project using module path.

Unless there's some easy fix available, currently one has to make a copy of Streams, LazilyParsedNumber, and TypeAdapters classes from the internal packages in order to use this provided class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions