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

Adding a new enum for CountryCodeSource UNSPECIFIED #1829

Merged
merged 4 commits into from
Jul 3, 2017
Merged

Conversation

lararennie
Copy link
Contributor

@lararennie lararennie commented Jul 3, 2017

This enum won't be noticed by most users, because the country_code_source field of the phone number is only populated with ParseAndKeepRawInput, and in this case, this enum won't be used.

However, it provides a better result for users who incorrectly call parse and then getCountryCodeSource() and expect to get a sensible answer; now they will get UNSPECIFIED instead of FROM_NUMBER_WITH_PLUS_SIGN which was the default before. In JS this method returns null, but getCountryCodeSourceOrDefault will now return UNSPECIFIED instead.

The numeric values of the enums have not changed (relevant for JS and C++) and in Java the new enum was added to the end so that any stored serialized phone numbers should be able to be restored as they were before.

Suggested in issue #1218


This change is Reviewable

@lararennie lararennie requested a review from keghani July 3, 2017 13:20
@lararennie lararennie merged commit bacdc0a into master Jul 3, 2017
@lararennie lararennie deleted the enum_change branch July 3, 2017 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants