This hasn't been used for a long time.
Deleted all methods that refer to this, and removed the field from the test XML file (somehow this was missed) as well.
Regenerated jars - because we no longer write a boolean to indicate whether we have the possible number pattern or not all the java metadata files needed regenerating too.
Deleted some data from the js phone metadata implementation that isn't used by js as well (national number matcher pattern)
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 existing 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
* It was confusing and unnecessary. Not every country that has short numbers beginning with a 0 had it, and it is not the only digit that could overlap with a national prefix and hence be interpreted incorrectly.
Alternate metadata and test metadata for C++ was regenerated not due to changes in this commit, but due to PR #1726 and that they should have been updated then.
* Updating the phonemetadata.pb.js file, deleting handling for a field
that does not exist, and adding a couple of @final notes for the closure
compiler.
1) Changing the BuildMetadataFromXml to only set
same_mobile_and_fixed_line_pattern and
national_prefix_optional_when_formatting if they differ from default
values, and the domestic_carrier_code_formatting_rule,
international_prefix and national_prefix_formatting_rule if there is
one.
2) Adding a test with some golden data for the BuildMetadataJsonFromXml.
3) Adding to the proto a missing explicit default false.
4) Updating a couple of methods in the Phonemetadata.java class to have
names that match those of the auto-generated Phonemetadata used by the
CPP build, now that we use those methods when building the metadata.
5) Fix to ant build file to enable the junit command to still work (instructions on open-source on how to regenerate metadata files refer to this)
Resulting data is smaller for Java and C++ and the resulting BuildMetadataJsonFromXml code is cleaner.
Added the missing requires this detected, removed the extra require. One
missing require was added manually (goog.object) since it's unable to
detect it.
Updated the readme: compiling everything seems to work at the moment.
* isNumberMatch fix for numbers with italian leading zero fields set. Only
affects people who haven't correctly constructed phone numbers using
methods like 'parse'.
* Adding C++ tests and fixing bug in ExactlySameAs method, which wasn't
updated to handle the number_of_leading_zeros field when that was added
to the phone number proto.
See pending_code_changes.txt for more details.
This could break client code. For anyone who has custom behaviour based on the value of the error, please compare against error.message instead of the error itself.