Browse Source

Merge pull request #884 from dlyongemallo/remove_if

remove check for nationalPrefixFormattingRule empty before setting nationalPrefixOptionalWhenFormatting in BuildMetadataFromXml
pull/886/head
Keghani Kouzoujian 10 years ago
parent
commit
0d99731eff
5 changed files with 6 additions and 8 deletions
  1. BIN
      java/carrier/src/com/google/i18n/phonenumbers/carrier/data/config
  2. BIN
      java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config
  3. +6
    -8
      tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
  4. BIN
      tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar
  5. BIN
      tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar

BIN
java/carrier/src/com/google/i18n/phonenumbers/carrier/data/config View File


BIN
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config View File


+ 6
- 8
tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java View File

@ -319,14 +319,12 @@ public class BuildMetadataFromXml {
format.setNationalPrefixFormattingRule(nationalPrefixFormattingRule);
}
if (format.hasNationalPrefixFormattingRule()) {
if (numberFormatElement.hasAttribute(NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)) {
format.setNationalPrefixOptionalWhenFormatting(
Boolean.valueOf(numberFormatElement.getAttribute(
NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)));
} else {
format.setNationalPrefixOptionalWhenFormatting(nationalPrefixOptionalWhenFormatting);
}
if (numberFormatElement.hasAttribute(NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)) {
format.setNationalPrefixOptionalWhenFormatting(
Boolean.valueOf(numberFormatElement.getAttribute(
NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)));
} else {
format.setNationalPrefixOptionalWhenFormatting(nationalPrefixOptionalWhenFormatting);
}
if (numberFormatElement.hasAttribute(CARRIER_CODE_FORMATTING_RULE)) {
format.setDomesticCarrierCodeFormattingRule(validateRE(


BIN
tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar View File


BIN
tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar View File


Loading…
Cancel
Save