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

Investigate WikiSite JSON parsing, and wikidata page namespace TODO comments #5989

Open
psh opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@psh
Copy link
Collaborator

psh commented Dec 2, 2024

During Java -> Kotlin migration I uncovered a couple of old //TODO comments that ought to be looked into given their age -

In NamespaceTypeAdapter

// Prior to 3210ce44, we marshaled Namespace as the name string of the enum, instead of
// the code number. This introduces a backwards-compatible check for the string value.
// TODO: remove after April 2017, when all older namespaces have been deserialized.

In WikiSiteTypeAdapter

// todo: legacy; remove reader June 2018
if (reader.peek() == JsonToken.STRING) {
    return WikiSite(Uri.parse(reader.nextString()))
}

and

// todo: legacy; remove reader June 2018
return if (languageCode == null) {
    WikiSite(domain)
} else {
    WikiSite(domain, languageCode)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants