Skip to content

Lists should be exposed to Kotlin as List, not MutableList #334

@david-allison

Description

@david-allison

Backend Codegen is problematic: it exposes a java.util.List, but this is actually a com.google.protobuf.Internal.ProtobufList. ProtobufList throws on mutation

Extends List to add the capability to make the list immutable and inspect if it is modifiable.

https://protobuf.dev/reference/java/api-docs/com/google/protobuf/Internal.ProtobufList

Reported in: ankidroid/Anki-Android#14948

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