diff --git a/icu4c/source/common/resbund.cpp b/icu4c/source/common/resbund.cpp index 2e0ee8cf414..f3a38ed35d6 100644 --- a/icu4c/source/common/resbund.cpp +++ b/icu4c/source/common/resbund.cpp @@ -269,7 +269,7 @@ ResourceBundle::constructForLocale(const UnicodeString& path, { char name[300]; - if(!path.empty()) { + if(!path.isEmpty()) { path.extract(name, sizeof(name), 0, error); resource = ures_open(name, locale.getName(), &error); } else { diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp index a919a3a7278..c48dbabf55a 100644 --- a/icu4c/source/test/intltest/ustrtest.cpp +++ b/icu4c/source/test/intltest/ustrtest.cpp @@ -1165,7 +1165,7 @@ void UnicodeStringTest::TestUnescape(void) { } // test that an empty string is returned in case of an error - if (!UNICODE_STRING("wrong \\u sequence", 17).unescape().empty()) { + if (!UNICODE_STRING("wrong \\u sequence", 17).unescape().isEmpty()) { errln("FAIL: unescaping of a string with an illegal escape sequence did not return an empty string"); } }