~ken-vandine/+junk/libphonenumber-7.1.0-4ubuntu1

« back to all changes in this revision

Viewing changes to tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java

  • Committer: Package Import Robot
  • Author(s): Daniel Pocock
  • Date: 2014-09-03 07:12:50 UTC
  • Revision ID: package-import@ubuntu.com-20140903071250-wzcgxhpc7w5k9pbb
Tags: 6.3~svn698-3
More patches for JDK 1.5 build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
      } else {
138
138
        // For most countries, there will be only one region code for the country calling code.
139
139
        List<String> listWithRegionCode = new ArrayList<String>(1);
140
 
        if (!regionCode.isEmpty()) {  // For alternate formats, there are no region codes at all.
 
140
        if (regionCode.length() != 0) {  // For alternate formats, there are no region codes at all.
141
141
          listWithRegionCode.add(regionCode);
142
142
        }
143
143
        countryCodeToRegionCodeMap.put(countryCode, listWithRegionCode);
202
202
            validateRE(element.getAttribute(NATIONAL_PREFIX_TRANSFORM_RULE)));
203
203
      }
204
204
    }
205
 
    if (!nationalPrefix.isEmpty()) {
 
205
    if (nationalPrefix.length() != 0) {
206
206
      metadata.setNationalPrefix(nationalPrefix);
207
207
      if (!metadata.hasNationalPrefixForParsing()) {
208
208
        metadata.setNationalPrefixForParsing(nationalPrefix);