ankidroid / ankidroid/Anki-Android-Backend

Lists should be exposed to Kotlin as `List`, not `MutableList`

Aperta
#334 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Kotlin
Stelle
91
Fork
54
Merge medio
1g 36m
PR unite (30g)
12

Descrizione

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: https://github.com/ankidroid/Anki-Android/pull/14948

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.