libphonenumber-7.7.2
Hi all,
Please find the new JARs on the maven site here.
Warning: this release may break your code unless you update your code at the same time, as it has the following breaking changes:
- Calls to
formatNationalNumberWithPreferredCarrierCode
, whereparseAndKeepRawInput
was used to provide the phone number and no carrier code was found, will now use the fallback carrier code. Before we erroneously used an empty string as a carrier code. - Calls to
formatNumberForMobileDialing
for Brazilian numbers previously produced output for any number, regardless of whether a carrier code was found or not, so long as the number had been obtained withparseAndKeepRawInput
. Now if no carrier code was found, no output will be produced, because we can't guarantee the number is diallable. If you want to get output regardless, you will need to explicitly set a carrier code for Brazilian numbers if none was present.
You may also need to update any tests that rely on the exact result of parsing a number using parseAndKeepRawInput
, since the preferred_domestic_carrier_code
won't be set where it was previously empty.
Full details in the release notes, along with information on what metadata has changed.
In light of the fact that this may require changes from clients using these methods to achieve the same behaviour as previous releases, we should have tagged this release as v8.0.0; apologies for this oversight. We hope it won't cause too much inconvenience.
Thanks to all those who contributed by providing issue reports!
Want to be notified of future breaking releases? Join the discussion group!