From: Yoshito Umaoka Date: Fri, 1 Jul 2011 21:07:32 +0000 (+0000) Subject: ICU-8675 Fixed a time zone parse regression problem. The condition used for checking... X-Git-Tag: milestone-59-0-1~4692 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aaca2b7e95b9364da8909433d659c93530c1fcd4;p=icu ICU-8675 Fixed a time zone parse regression problem. The condition used for checking perfect match was wrong. X-SVN-Rev: 30266 --- diff --git a/icu4c/source/i18n/tzgnames.cpp b/icu4c/source/i18n/tzgnames.cpp index 9ace791007e..24aaf1ce1d5 100644 --- a/icu4c/source/i18n/tzgnames.cpp +++ b/icu4c/source/i18n/tzgnames.cpp @@ -972,7 +972,7 @@ TimeZoneGenericNames::findLocal(const UnicodeString& text, int32_t start, uint32 int32_t maxLen = 0; UVector *results = handler.getMatches(maxLen); - if ((results != NULL && (maxLen == (text.length() - start))) || fGNamesTrieFullyLoaded) { + if (results != NULL && ((maxLen == (text.length() - start)) || fGNamesTrieFullyLoaded)) { // perfect match gmatchInfo = new TimeZoneGenericNameMatchInfo(results); if (gmatchInfo == NULL) { diff --git a/icu4c/source/i18n/tznames_impl.cpp b/icu4c/source/i18n/tznames_impl.cpp index d2682ea3757..e68833c5a6a 100644 --- a/icu4c/source/i18n/tznames_impl.cpp +++ b/icu4c/source/i18n/tznames_impl.cpp @@ -1351,7 +1351,7 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types int32_t maxLen = 0; UVector *results = handler.getMatches(maxLen); - if ((results != NULL && (maxLen == (text.length() - start))) || fNamesTrieFullyLoaded) { + if (results != NULL && ((maxLen == (text.length() - start)) || fNamesTrieFullyLoaded)) { // perfect match matchInfo = new TimeZoneNameMatchInfoImpl(results); if (matchInfo == NULL) {