Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #518 +/- ##
==========================================
+ Coverage 88.07% 88.26% +0.18%
==========================================
Files 43 43
Lines 3891 3894 +3
Branches 993 993
==========================================
+ Hits 3427 3437 +10
+ Misses 264 255 -9
- Partials 200 202 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calling
SetCountryCode(0)currently loses field presence:HasCountryCodereturns false, merging the resulting number into a builder with country code 44 leaves 44 in place, and formatting an explicit zero-country/zero-national number as E164 returns an empty string instead of Java's+00. This is a verified P3, high-confidence parity defect affecting manually built partial numbers.Track country-code presence separately from its integer value, including internal assignments, and clear both in
ClearCountryCode. Merge and clone operations now retain an explicit zero. Equality and hashing continue to ignore country-code presence, following Java. This changes private storage and existing behavior only; no public member, metadata, regex, dependency, or Java-source changes.Java reference: master
33be5664343676b27761213d8f5500d682568ea7. Phonenumber.java explicitly tracks presence insetCountryCode,clearCountryCode, andmergeFrom;exactlySameAsignores this flag. PhoneNumberUtil.format tests presence when choosing the all-zero raw-input fallback. Existing upstream PhonenumberTest and PhoneNumberUtilTest were compared before adding the focused regressions.Validation:
14fdad223881d77c7679cbf6e6e0eecc52e036f5is identical. Shipped metadata remains C#9.0.42 / Java9.0.41; resources were not manually read or edited.Performance: repeated isolated BDN release measurements (in-process, 5 warmups, 10 requested 300ms iterations, one process per version) measured format 31.91→33.88ns, construction 4.01→4.37ns, copy 7.79→7.73ns, parse 352.52→415.54ns. Allocation remains 48/56/80/368B respectively. Outliers and especially the wide parse interval make throughput inconclusive; these samples are not a no-regression guarantee. CI benchmarks should be reviewed. C# main baseline:
2a0bb649a22a518ee74133fdbcebcf39f8ebbbd4.