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

Parse and refuse invalid calendar option #122

Merged
merged 1 commit into from
Sep 18, 2018
Merged

Parse and refuse invalid calendar option #122

merged 1 commit into from
Sep 18, 2018

Conversation

thiemowmde
Copy link
Contributor

@thiemowmde thiemowmde commented Sep 5, 2016

I do classify this as a bug. An unknown calendar string should either be kept as it is (TimeValue happily stores any non-empty string, and the validators we have in place will reject everything that's not a Wikidata concept URI). Or it should be rejected if the relevant CalendarModelParser does not understand it (which is what this patch does). But unknown strings should never silently become the Gregorian URI.

You might think this is a breaking change because code that could never fail before now throws a ParseException. But note this was always possible and documented, see IsoTimestampParser::stringParse. The exception is just thrown for one more reason now.

Bug: T141518

@thiemowmde thiemowmde added the bug label Sep 5, 2016
@thiemowmde thiemowmde mentioned this pull request Aug 3, 2017
@thiemowmde thiemowmde changed the title [WIP] Parse and refuse invalid calendar option Parse and refuse invalid calendar option Aug 3, 2017
@addshore addshore merged commit fde1f57 into master Sep 18, 2018
@JeroenDeDauw JeroenDeDauw deleted the calendarOption branch September 18, 2018 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants