Merge "Track ICU54 CLDR update."
diff --git a/luni/src/main/java/java/nio/charset/CharsetEncoder.java b/luni/src/main/java/java/nio/charset/CharsetEncoder.java
index 9217bba..84373c5 100644
--- a/luni/src/main/java/java/nio/charset/CharsetEncoder.java
+++ b/luni/src/main/java/java/nio/charset/CharsetEncoder.java
@@ -199,8 +199,10 @@
onMalformedInput(CodingErrorAction.REPORT);
onUnmappableCharacter(CodingErrorAction.REPORT);
try {
- encode(cb);
- return true;
+ ByteBuffer buf = encode(cb);
+ // b/18474439: ICU will return U_ZERO_ERROR but produce an output buffer
+ // of size zero when it encounters an ignorable codepoint.
+ return buf.hasRemaining();
} catch (CharacterCodingException e) {
return false;
} finally {
diff --git a/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java b/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java
index 057cd17..0c97f34 100644
--- a/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java
+++ b/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java
@@ -154,9 +154,9 @@
// Pacific/Apia is somewhat arbitrary; we just want a zone we have to generate
// "GMT" strings for the short names.
if (row[0].equals("Pacific/Apia")) {
- assertEquals("Samoa Standard Time", row[1]);
+ assertEquals("Apia Standard Time", row[1]);
assertEquals("GMT+13:00", row[2]);
- assertEquals("Samoa Daylight Time", row[3]);
+ assertEquals("Apia Daylight Time", row[3]);
assertEquals("GMT+14:00", row[4]);
}
}
diff --git a/luni/src/test/java/libcore/java/util/TimeZoneTest.java b/luni/src/test/java/libcore/java/util/TimeZoneTest.java
index c40c974..aadb9df 100644
--- a/luni/src/test/java/libcore/java/util/TimeZoneTest.java
+++ b/luni/src/test/java/libcore/java/util/TimeZoneTest.java
@@ -266,8 +266,8 @@
// http://b/7955614
public void testApia() throws Exception {
TimeZone tz = TimeZone.getTimeZone("Pacific/Apia");
- assertEquals("Samoa Daylight Time", tz.getDisplayName(true, TimeZone.LONG, Locale.US));
- assertEquals("Samoa Standard Time", tz.getDisplayName(false, TimeZone.LONG, Locale.US));
+ assertEquals("Apia Daylight Time", tz.getDisplayName(true, TimeZone.LONG, Locale.US));
+ assertEquals("Apia Standard Time", tz.getDisplayName(false, TimeZone.LONG, Locale.US));
assertEquals("GMT+14:00", tz.getDisplayName(true, TimeZone.SHORT, Locale.US));
assertEquals("GMT+13:00", tz.getDisplayName(false, TimeZone.SHORT, Locale.US));
}