Merge "Add rule for toggling changes at test time"
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 52ae839..afba8e9 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -209,9 +209,9 @@
sdk_version: "none",
system_modules: "none",
+ patch_module: "java.base",
openjdk9: {
srcs: ["luni/src/module/java/module-info.java"],
- javacflags: ["--patch-module=java.base=."],
},
java_resources: core_resources,
@@ -266,9 +266,7 @@
sdk_version: "none",
system_modules: "core-all-system-modules",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
jacoco: {
exclude_filter: [
@@ -312,9 +310,7 @@
sdk_version: "none",
system_modules: "core-all-system-modules",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
jacoco: {
exclude_filter: [
@@ -370,9 +366,7 @@
sdk_version: "none",
system_modules: "core-all-system-modules",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
}
//
@@ -416,9 +410,7 @@
sdk_version: "none",
system_modules: "core-all-system-modules",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
notice: "ojluni/NOTICE",
@@ -470,9 +462,7 @@
hostdex: true,
sdk_version: "none",
system_modules: "core-all-system-modules",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
notice: "ojluni/NOTICE",
installable: false,
include_srcs: true,
@@ -663,7 +653,7 @@
// code if it's declared to also be in java.base at
// compile time.
//
- // For now, we use --patch-module to put all sources
+ // For now, we use patch_module to put all sources
// and dependencies from this make target into java.base;
// other source directories in this make target are in
// packages not from java.base; if this becomes a problem
@@ -777,9 +767,7 @@
"-Xep:MissingOverride:OFF",
],
},
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
sdk_version: "none",
system_modules: "none",
}
@@ -809,7 +797,7 @@
// Ensure that core libraries that depend on the public API can access
// the UnsupportedAppUsage, CorePlatformApi and IntraCoreApi
// annotations.
- "libcore-unsupportedappusage-annotation",
+ "art.module.api.annotations.for.system.modules",
],
}
@@ -901,12 +889,15 @@
],
}
-// A library that contains annotations not retented in runtime and inline-able constants
-// that should not introduce any runtime dependency for compiling core libraries, e.g. core-icu4j,
+// A library that contains annotations that define API surfaces (core
+// platform, intra core and the hidden API) along with some supporting
+// constants. The annotations are source only and do not introduce any runtime
+// dependencies. Specially built for use in system modules definitions to
+// avoid introducing compile time cycles.
java_library {
- name: "libcore-unsupportedappusage-annotation",
+ name: "art.module.api.annotations.for.system.modules",
srcs: [
- ":unsupportedappusage_annotation_files",
+ ":api_surface_annotation_files",
],
installable: false,
@@ -915,16 +906,16 @@
patch_module: "java.base",
}
-// The source files that contain the UnsupportedAppUsage annotation and its dependencies.
-filegroup {
- name: "unsupportedappusage_annotation_files",
+// Create a library containing the api surface annotations, built against
+// core_current for use by the annotation processor in frameworks/base.
+java_library {
+ name: "art.module.api.annotations",
visibility: [
"//frameworks/base",
],
+ host_supported: true,
srcs: [
- "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
- "dalvik/src/main/java/dalvik/system/VersionCodes.java",
- "luni/src/main/java/libcore/api/CorePlatformApi.java",
- "luni/src/main/java/libcore/api/IntraCoreApi.java",
+ ":api_surface_annotation_files",
],
+ sdk_version: "core_current",
}
diff --git a/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java b/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
index a5c0dc5..f25233c 100644
--- a/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
+++ b/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
@@ -57,6 +57,16 @@
* </p>
*
* <p>
+ * Note that even in FastNative methods you <b>are</b> allowed to
+ * allocate objects and make upcalls into Java code. A call from Java to
+ * a FastNative function and back to Java is equivalent to a call from one Java
+ * method to another. What's forbidden in a FastNative method is blocking
+ * the calling thread in some non-Java code and thereby preventing the thread
+ * from responding to requests from the garbage collector to enter the suspended
+ * state.
+ * </p>
+ *
+ * <p>
* Has no effect when used with non-native methods.
* </p>
*
diff --git a/luni/src/main/java/java/math/TEST_MAPPING b/luni/src/main/java/java/math/TEST_MAPPING
index 6b9ceb7..1038858 100644
--- a/luni/src/main/java/java/math/TEST_MAPPING
+++ b/luni/src/main/java/java/math/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/luni/src/main/java/java/nio/TEST_MAPPING b/luni/src/main/java/java/nio/TEST_MAPPING
index 9f40bc4..3fe450e 100644
--- a/luni/src/main/java/java/nio/TEST_MAPPING
+++ b/luni/src/main/java/java/nio/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/luni/src/main/java/java/nio/charset/TEST_MAPPING b/luni/src/main/java/java/nio/charset/TEST_MAPPING
index 7dcd5b4..ec926f9 100644
--- a/luni/src/main/java/java/nio/charset/TEST_MAPPING
+++ b/luni/src/main/java/java/nio/charset/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/luni/src/main/java/libcore/timezone/CountryTimeZones.java b/luni/src/main/java/libcore/timezone/CountryTimeZones.java
index 0ef631c..d0fa081 100644
--- a/luni/src/main/java/libcore/timezone/CountryTimeZones.java
+++ b/luni/src/main/java/libcore/timezone/CountryTimeZones.java
@@ -38,7 +38,7 @@
* @hide
*/
@libcore.api.CorePlatformApi
- public final static class OffsetResult {
+ public static final class OffsetResult {
/** A zone that matches the supplied criteria. See also {@link #mOneMatch}. */
@libcore.api.CorePlatformApi
@@ -68,7 +68,7 @@
* @hide
*/
@libcore.api.CorePlatformApi
- public final static class TimeZoneMapping {
+ public static final class TimeZoneMapping {
@libcore.api.CorePlatformApi
public final String timeZoneId;
@libcore.api.CorePlatformApi
@@ -168,6 +168,11 @@
private final String countryIso;
private final String defaultTimeZoneId;
+ /**
+ * {@code true} indicates the default time zone for a country is a good choice if a time zone
+ * cannot be determined by other means.
+ */
+ private final boolean defaultTimeZoneBoost;
private final List<TimeZoneMapping> timeZoneMappings;
private final boolean everUsesUtc;
@@ -177,10 +182,12 @@
*/
private TimeZone defaultTimeZone;
- private CountryTimeZones(String countryIso, String defaultTimeZoneId, boolean everUsesUtc,
+ private CountryTimeZones(String countryIso, String defaultTimeZoneId,
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
List<TimeZoneMapping> timeZoneMappings) {
this.countryIso = java.util.Objects.requireNonNull(countryIso);
this.defaultTimeZoneId = defaultTimeZoneId;
+ this.defaultTimeZoneBoost = defaultTimeZoneBoost;
this.everUsesUtc = everUsesUtc;
// Create a defensive copy of the mapping list.
this.timeZoneMappings = Collections.unmodifiableList(new ArrayList<>(timeZoneMappings));
@@ -190,7 +197,8 @@
* Creates a {@link CountryTimeZones} object containing only known time zone IDs.
*/
public static CountryTimeZones createValidated(String countryIso, String defaultTimeZoneId,
- boolean everUsesUtc, List<TimeZoneMapping> timeZoneMappings, String debugInfo) {
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
+ List<TimeZoneMapping> timeZoneMappings, String debugInfo) {
// We rely on ZoneInfoDB to tell us what the known valid time zone IDs are. ICU may
// recognize more but we want to be sure that zone IDs can be used with java.util as well as
@@ -219,7 +227,8 @@
String normalizedCountryIso = normalizeCountryIso(countryIso);
return new CountryTimeZones(
- normalizedCountryIso, defaultTimeZoneId, everUsesUtc, validCountryTimeZoneMappings);
+ normalizedCountryIso, defaultTimeZoneId, defaultTimeZoneBoost, everUsesUtc,
+ validCountryTimeZoneMappings);
}
/**
@@ -241,7 +250,7 @@
/**
* Returns the default time zone for the country. Can return null in cases when no data is
* available or the time zone ID provided to
- * {@link #createValidated(String, String, boolean, List, String)} was not recognized.
+ * {@link #createValidated(String, String, boolean, boolean, List, String)} was not recognized.
*/
@libcore.api.CorePlatformApi
public synchronized TimeZone getDefaultTimeZone() {
@@ -260,7 +269,7 @@
/**
* Returns the default time zone ID for the country. Can return null in cases when no data is
* available or the time zone ID provided to
- * {@link #createValidated(String, String, boolean, List, String)} was not recognized.
+ * {@link #createValidated(String, String, boolean, boolean, List, String)} was not recognized.
*/
@libcore.api.CorePlatformApi
public String getDefaultTimeZoneId() {
@@ -268,6 +277,15 @@
}
/**
+ * Qualifier for a country's default time zone. {@code true} indicates whether the default
+ * would be a good choice <em>generally</em> when there's no other information available.
+ */
+ @libcore.api.CorePlatformApi
+ public boolean getDefaultTimeZoneBoost() {
+ return defaultTimeZoneBoost;
+ }
+
+ /**
* Returns an immutable, ordered list of time zone mappings for the country in an undefined but
* "priority" order. The list can be empty if there were no zones configured or the configured
* zone IDs were not recognized.
@@ -303,28 +321,19 @@
if (o == null || getClass() != o.getClass()) {
return false;
}
-
CountryTimeZones that = (CountryTimeZones) o;
-
- if (everUsesUtc != that.everUsesUtc) {
- return false;
- }
- if (!countryIso.equals(that.countryIso)) {
- return false;
- }
- if (!Objects.equals(defaultTimeZoneId, that.defaultTimeZoneId)) {
- return false;
- }
- return timeZoneMappings.equals(that.timeZoneMappings);
+ return defaultTimeZoneBoost == that.defaultTimeZoneBoost
+ && everUsesUtc == that.everUsesUtc
+ && countryIso.equals(that.countryIso)
+ && Objects.equals(defaultTimeZoneId, that.defaultTimeZoneId)
+ && timeZoneMappings.equals(that.timeZoneMappings);
}
@Override
public int hashCode() {
- int result = countryIso.hashCode();
- result = 31 * result + (defaultTimeZoneId != null ? defaultTimeZoneId.hashCode() : 0);
- result = 31 * result + timeZoneMappings.hashCode();
- result = 31 * result + (everUsesUtc ? 1 : 0);
- return result;
+ return Objects.hash(
+ countryIso, defaultTimeZoneId, defaultTimeZoneBoost, timeZoneMappings,
+ everUsesUtc);
}
/**
diff --git a/luni/src/main/java/libcore/timezone/TimeZoneFinder.java b/luni/src/main/java/libcore/timezone/TimeZoneFinder.java
index fefe760..d9e92bd 100644
--- a/luni/src/main/java/libcore/timezone/TimeZoneFinder.java
+++ b/luni/src/main/java/libcore/timezone/TimeZoneFinder.java
@@ -20,8 +20,6 @@
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
-import android.icu.util.TimeZone;
-
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Reader;
@@ -58,10 +56,12 @@
// Country zones section. e.g. <countryzones>
private static final String COUNTRY_ZONES_ELEMENT = "countryzones";
- // Country data. e.g. <country code="gb" default="Europe/London" everutc="y">
+ // Country data. e.g.
+ // <country code="gb" default="Europe/London" defaultBoost="y" everutc="y">
private static final String COUNTRY_ELEMENT = "country";
private static final String COUNTRY_CODE_ATTRIBUTE = "code";
private static final String DEFAULT_TIME_ZONE_ID_ATTRIBUTE = "default";
+ private static final String DEFAULT_TIME_ZONE_BOOST_ATTRIBUTE = "defaultBoost";
private static final String EVER_USES_UTC_ATTRIBUTE = "everutc";
// Country -> Time zone mapping. e.g. <id>ZoneId</id>, <id picker="n">ZoneId</id>,
@@ -230,9 +230,9 @@
/**
* Processes the XML, applying the {@link TimeZonesProcessor} to the <countryzones>
- * element. Processing can terminate early if the
- * {@link TimeZonesProcessor#processCountryZones(String, String, boolean, List, String)} returns
- * {@link TimeZonesProcessor#HALT} or it throws an exception.
+ * element. Processing can terminate early if the {@link TimeZonesProcessor#processCountryZones(
+ * String, String, boolean, boolean, List, String)} returns {@link TimeZonesProcessor#HALT} or
+ * it throws an exception.
*/
private void processXml(TimeZonesProcessor processor)
throws XmlPullParserException, IOException {
@@ -254,7 +254,7 @@
* ...
* <id>America/Los_Angeles</id>
* </country>
- * <country code="gb" default="Europe/London">
+ * <country code="gb" default="Europe/London" defaultBoost="y">
* <id>Europe/London</id>
* </country>
* </countryzones>
@@ -308,12 +308,17 @@
throw new XmlPullParserException(
"Unable to find country code: " + parser.getPositionDescription());
}
+
String defaultTimeZoneId = parser.getAttributeValue(
null /* namespace */, DEFAULT_TIME_ZONE_ID_ATTRIBUTE);
if (defaultTimeZoneId == null || defaultTimeZoneId.isEmpty()) {
throw new XmlPullParserException("Unable to find default time zone ID: "
+ parser.getPositionDescription());
}
+
+ boolean defaultTimeZoneBoost = parseBooleanAttribute(parser,
+ DEFAULT_TIME_ZONE_BOOST_ATTRIBUTE, false);
+
Boolean everUsesUtc = parseBooleanAttribute(
parser, EVER_USES_UTC_ATTRIBUTE, null /* defaultValue */);
if (everUsesUtc == null) {
@@ -325,8 +330,8 @@
String debugInfo = parser.getPositionDescription();
List<TimeZoneMapping> timeZoneMappings = parseTimeZoneMappings(parser);
- boolean result = processor.processCountryZones(code, defaultTimeZoneId, everUsesUtc,
- timeZoneMappings, debugInfo);
+ boolean result = processor.processCountryZones(code, defaultTimeZoneId,
+ defaultTimeZoneBoost, everUsesUtc, timeZoneMappings, debugInfo);
if (result == TimeZonesProcessor.HALT) {
return TimeZonesProcessor.HALT;
}
@@ -568,7 +573,8 @@
* <p>The default implementation returns {@link #CONTINUE}.
*/
default boolean processCountryZones(String countryIso, String defaultTimeZoneId,
- boolean everUsesUtc, List<TimeZoneMapping> timeZoneMappings, String debugInfo)
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
+ List<TimeZoneMapping> timeZoneMappings, String debugInfo)
throws XmlPullParserException {
return CONTINUE;
}
@@ -588,7 +594,8 @@
@Override
public boolean processCountryZones(String countryIso, String defaultTimeZoneId,
- boolean everUsesUtc, List<TimeZoneMapping> timeZoneMappings, String debugInfo)
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
+ List<TimeZoneMapping> timeZoneMappings, String debugInfo)
throws XmlPullParserException {
if (!normalizeCountryIso(countryIso).equals(countryIso)) {
throw new XmlPullParserException("Country code: " + countryIso
@@ -641,11 +648,13 @@
@Override
public boolean processCountryZones(String countryIso, String defaultTimeZoneId,
- boolean everUsesUtc, List<TimeZoneMapping> timeZoneMappings, String debugInfo)
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
+ List<TimeZoneMapping> timeZoneMappings, String debugInfo)
throws XmlPullParserException {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- countryIso, defaultTimeZoneId, everUsesUtc, timeZoneMappings, debugInfo);
+ countryIso, defaultTimeZoneId, defaultTimeZoneBoost, everUsesUtc,
+ timeZoneMappings, debugInfo);
countryTimeZonesList.add(countryTimeZones);
return CONTINUE;
}
@@ -671,13 +680,15 @@
@Override
public boolean processCountryZones(String countryIso, String defaultTimeZoneId,
- boolean everUsesUtc, List<TimeZoneMapping> timeZoneMappings, String debugInfo) {
+ boolean defaultTimeZoneBoost, boolean everUsesUtc,
+ List<TimeZoneMapping> timeZoneMappings, String debugInfo) {
countryIso = normalizeCountryIso(countryIso);
if (!countryCodeToMatch.equals(countryIso)) {
return CONTINUE;
}
validatedCountryTimeZones = CountryTimeZones.createValidated(countryIso,
- defaultTimeZoneId, everUsesUtc, timeZoneMappings, debugInfo);
+ defaultTimeZoneId, defaultTimeZoneBoost, everUsesUtc, timeZoneMappings,
+ debugInfo);
return HALT;
}
diff --git a/luni/src/test/java/libcore/libcore/timezone/CountryTimeZonesTest.java b/luni/src/test/java/libcore/libcore/timezone/CountryTimeZonesTest.java
index 04f4811..1b9aad0 100644
--- a/luni/src/test/java/libcore/libcore/timezone/CountryTimeZonesTest.java
+++ b/luni/src/test/java/libcore/libcore/timezone/CountryTimeZonesTest.java
@@ -72,8 +72,8 @@
@Test
public void createValidated() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */,
+ true /* everUsesUtc */, timeZoneMappings("Europe/London"), "test");
assertTrue(countryTimeZones.isForCountryCode("gb"));
assertEquals("Europe/London", countryTimeZones.getDefaultTimeZoneId());
assertZoneEquals(zone("Europe/London"), countryTimeZones.getDefaultTimeZone());
@@ -85,7 +85,8 @@
@Test
public void createValidated_nullDefault() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", null, true /* everUsesUtc */, timeZoneMappings("Europe/London"), "test");
+ "gb", null, false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
assertNull(countryTimeZones.getDefaultTimeZoneId());
assertNull(countryTimeZones.getDefaultTimeZone());
}
@@ -93,7 +94,7 @@
@Test
public void createValidated_invalidDefault() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", INVALID_TZ_ID, true /* everUsesUtc */,
+ "gb", INVALID_TZ_ID, false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Europe/London", INVALID_TZ_ID), "test");
assertNull(countryTimeZones.getDefaultTimeZoneId());
assertNull(countryTimeZones.getDefaultTimeZone());
@@ -105,7 +106,7 @@
@Test
public void createValidated_unknownTimeZoneIdIgnored() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */,
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Unknown_Id", "Europe/London"), "test");
assertEquals(timeZoneMappings("Europe/London"), countryTimeZones.getTimeZoneMappings());
assertEquals(timeZoneMappings("Europe/London"),
@@ -115,8 +116,8 @@
@Test
public void isForCountryCode() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
assertTrue(countryTimeZones.isForCountryCode("GB"));
assertTrue(countryTimeZones.isForCountryCode("Gb"));
assertTrue(countryTimeZones.isForCountryCode("gB"));
@@ -125,8 +126,8 @@
@Test
public void structuresAreImmutable() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
assertImmutableTimeZone(countryTimeZones.getDefaultTimeZone());
@@ -143,7 +144,7 @@
@Test
public void lookupByOffsetWithBias_oneCandidate() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */,
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Europe/London"), "test");
OffsetResult lonMatch = new OffsetResult(LON_TZ, true /* oneMatch */);
@@ -204,7 +205,7 @@
@Test
public void lookupByOffsetWithBias_multipleNonOverlappingCandidates() throws Exception {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */,
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("America/New_York", "Europe/London"), "test");
OffsetResult lonMatch = new OffsetResult(LON_TZ, true /* oneMatch */);
@@ -280,7 +281,7 @@
// Three zones that have the same offset for some of the year. Europe/London changes
// offset WHEN_DST, the others do not.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */,
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Atlantic/Reykjavik", "Europe/London", "Etc/UTC"), "test");
// Placeholder constants to improve test case readability.
@@ -395,7 +396,8 @@
@Test
public void getEffectiveTimeZonesAt_noZones() {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */, timeZoneMappings(), "test");
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings(), "test");
assertEquals(timeZoneMappings(),
countryTimeZones.getEffectiveTimeZoneMappingsAt(0 /* whenMillis */));
assertEquals(timeZoneMappings(),
@@ -407,7 +409,7 @@
@Test
public void getEffectiveTimeZonesAt_oneZone() {
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */,
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Europe/London"), "test");
assertEquals(timeZoneMappings("Europe/London"),
countryTimeZones.getEffectiveTimeZoneMappingsAt(0));
@@ -427,7 +429,8 @@
List<TimeZoneMapping> timeZoneMappings = list(alwaysUsed, notAlwaysUsed);
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */, timeZoneMappings, "test");
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings, "test");
// Before and at mappingNotUsedAfterMillis, both mappings are "effective".
assertEquals(list(alwaysUsed, notAlwaysUsed),
@@ -447,7 +450,8 @@
public void hasUtcZone_everUseUtcHintOverridesZoneInformation() {
// The country has a single zone. Europe/London uses UTC in Winter.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Etc/UTC", false /* everUsesUtc */, timeZoneMappings("Etc/UTC"), "test");
+ "xx", "Etc/UTC", false /* defaultTimeZoneBoost */, false /* everUsesUtc */,
+ timeZoneMappings("Etc/UTC"), "test");
assertFalse(countryTimeZones.hasUtcZone(WHEN_DST));
assertFalse(countryTimeZones.hasUtcZone(WHEN_NO_DST));
}
@@ -456,8 +460,8 @@
public void hasUtcZone_singleZone() {
// The country has a single zone. Europe/London uses UTC in Winter.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "xx", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
assertFalse(countryTimeZones.hasUtcZone(WHEN_DST));
assertTrue(countryTimeZones.hasUtcZone(WHEN_NO_DST));
}
@@ -466,7 +470,8 @@
public void hasUtcZone_multipleZonesWithUtc() {
// The country has multiple zones. Europe/London uses UTC in Winter.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "America/Los_Angeles", true /* everUsesUtc */,
+ "xx", "America/Los_Angeles", false /* defaultTimeZoneBoost */,
+ true /* everUsesUtc */,
timeZoneMappings("America/Los_Angeles", "America/New_York", "Europe/London"),
"test");
assertFalse(countryTimeZones.hasUtcZone(WHEN_DST));
@@ -477,7 +482,7 @@
public void hasUtcZone_multipleZonesWithoutUtc() {
// The country has multiple zones, none of which use UTC.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", "Europe/Paris", false /* everUsesUtc */,
+ "xx", "Europe/Paris", false /* defaultTimeZoneBoost */, false /* everUsesUtc */,
timeZoneMappings("America/Los_Angeles", "America/New_York", "Europe/Paris"),
"test");
assertFalse(countryTimeZones.hasUtcZone(WHEN_DST));
@@ -488,8 +493,8 @@
public void hasUtcZone_emptyZones() {
// The country has no valid zones.
CountryTimeZones countryTimeZones = CountryTimeZones.createValidated(
- "xx", INVALID_TZ_ID, false /* everUsesUtc */, timeZoneMappings(INVALID_TZ_ID),
- "test");
+ "xx", INVALID_TZ_ID, false /* defaultTimeZoneBoost */, false /* everUsesUtc */,
+ timeZoneMappings(INVALID_TZ_ID), "test");
assertTrue(countryTimeZones.getTimeZoneMappings().isEmpty());
assertFalse(countryTimeZones.hasUtcZone(WHEN_DST));
assertFalse(countryTimeZones.hasUtcZone(WHEN_NO_DST));
diff --git a/luni/src/test/java/libcore/libcore/timezone/CountryZonesFinderTest.java b/luni/src/test/java/libcore/libcore/timezone/CountryZonesFinderTest.java
index 7fc2abf..ecd5201 100644
--- a/luni/src/test/java/libcore/libcore/timezone/CountryZonesFinderTest.java
+++ b/luni/src/test/java/libcore/libcore/timezone/CountryZonesFinderTest.java
@@ -33,16 +33,19 @@
public class CountryZonesFinderTest {
private static final CountryTimeZones GB_ZONES = CountryTimeZones.createValidated(
- "gb", "Europe/London", true, timeZoneMappings("Europe/London"), "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true,
+ timeZoneMappings("Europe/London"), "test");
private static final CountryTimeZones IM_ZONES = CountryTimeZones.createValidated(
- "im", "Europe/London", true, timeZoneMappings("Europe/London"), "test");
+ "im", "Europe/London", false /* defaultTimeZoneBoost */, true,
+ timeZoneMappings("Europe/London"), "test");
private static final CountryTimeZones FR_ZONES = CountryTimeZones.createValidated(
- "fr", "Europe/Paris", true, timeZoneMappings("Europe/Paris"), "test");
+ "fr", "Europe/Paris", false /* defaultTimeZoneBoost */, true,
+ timeZoneMappings("Europe/Paris"), "test");
private static final CountryTimeZones US_ZONES = CountryTimeZones.createValidated(
- "us", "America/New_York", true,
+ "us", "America/New_York", false /* defaultTimeZoneBoost */, true,
timeZoneMappings("America/New_York", "America/Los_Angeles"), "test");
@Test
diff --git a/luni/src/test/java/libcore/libcore/timezone/TimeZoneFinderTest.java b/luni/src/test/java/libcore/libcore/timezone/TimeZoneFinderTest.java
index 2525fba..261a605 100644
--- a/luni/src/test/java/libcore/libcore/timezone/TimeZoneFinderTest.java
+++ b/luni/src/test/java/libcore/libcore/timezone/TimeZoneFinderTest.java
@@ -20,8 +20,6 @@
import org.junit.Before;
import org.junit.Test;
-import android.icu.util.TimeZone;
-
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
@@ -40,6 +38,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class TimeZoneFinderTest {
@@ -81,8 +80,8 @@
+ " </countryzones>\n"
+ "</timezones>\n";
CountryTimeZones expectedCountryTimeZones1 = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
String validXml2 = "<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
@@ -92,8 +91,8 @@
+ " </countryzones>\n"
+ "</timezones>\n";
CountryTimeZones expectedCountryTimeZones2 = CountryTimeZones.createValidated(
- "gb", "Europe/Paris", false /* everUsesUtc */, timeZoneMappings("Europe/Paris"),
- "test");
+ "gb", "Europe/Paris", false /* defaultTimeZoneBoost */, false /* everUsesUtc */,
+ timeZoneMappings("Europe/Paris"), "test");
String invalidXml = "<foo></foo>\n";
checkValidateThrowsParserException(invalidXml);
@@ -158,8 +157,8 @@
@Test
public void xmlParsing_unexpectedComments() throws Exception {
CountryTimeZones expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
TimeZoneFinder finder = validate("<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
@@ -186,8 +185,8 @@
@Test
public void xmlParsing_unexpectedElementsIgnored() throws Exception {
CountryTimeZones expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
String unexpectedElement = "<unexpected-element>\n<a /></unexpected-element>\n";
TimeZoneFinder finder = validate("<timezones ianaversion=\"2017b\">\n"
@@ -243,7 +242,7 @@
assertEquals(expectedCountryTimeZones, finder.lookupCountryTimeZones("gb"));
expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */,
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Europe/London", "Europe/Paris"), "test");
finder = validate("<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
@@ -260,8 +259,8 @@
@Test
public void xmlParsing_unexpectedTextIgnored() throws Exception {
CountryTimeZones expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
String unexpectedText = "unexpected-text";
TimeZoneFinder finder = validate("<timezones ianaversion=\"2017b\">\n"
@@ -295,7 +294,7 @@
assertEquals(expectedCountryTimeZones, finder.lookupCountryTimeZones("gb"));
expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */,
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
timeZoneMappings("Europe/London", "Europe/Paris"), "test");
finder = validate("<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
@@ -353,8 +352,8 @@
@Test
public void xmlParsing_unknownTimeZoneIdIgnored() throws Exception {
CountryTimeZones expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
TimeZoneFinder finder = validate("<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
+ " <country code=\"gb\" default=\"Europe/London\" everutc=\"y\">\n"
@@ -411,6 +410,32 @@
}
@Test
+ public void xmlParsing_badCountryDefaultBoost() throws Exception {
+ checkValidateThrowsParserException("<timezones ianaversion=\"2017b\">\n"
+ + " <countryzones>\n"
+ + " <country code=\"gb\" default=\"Europe/London\" defaultBoost=\"nope\""
+ + "everutc=\"y\">\n"
+ + " <id>Europe/London</id>\n"
+ + " </country>\n"
+ + " </countryzones>\n"
+ + "</timezones>\n");
+ }
+
+ @Test
+ public void xmlParsing_countryDefaultBoost() throws Exception {
+ TimeZoneFinder finder = validate("<timezones ianaversion=\"2017b\">\n"
+ + " <countryzones>\n"
+ + " <country code=\"gb\" default=\"Europe/London\" defaultBoost=\"y\""
+ + "everutc=\"y\">\n"
+ + " <id>Europe/London</id>\n"
+ + " </country>\n"
+ + " </countryzones>\n"
+ + "</timezones>\n");
+ CountryTimeZones countryTimeZones = finder.lookupCountryTimeZones("gb");
+ assertTrue(countryTimeZones.getDefaultTimeZoneBoost());
+ }
+
+ @Test
public void xmlParsing_badTimeZoneMappingPicker() throws Exception {
checkValidateThrowsParserException("<timezones ianaversion=\"2017b\">\n"
+ " <countryzones>\n"
@@ -497,10 +522,10 @@
+ " </country>\n"
+ " </countryzones>\n"
+ "</timezones>\n");
- CountryTimeZones expectedGb = CountryTimeZones.createValidated("gb", "Europe/London", true,
- timeZoneMappings("Europe/London"), "test");
- CountryTimeZones expectedFr = CountryTimeZones.createValidated("fr", "Europe/Paris", true,
- timeZoneMappings("Europe/Paris"), "test");
+ CountryTimeZones expectedGb = CountryTimeZones.createValidated("gb", "Europe/London",
+ false /* defaultTimeZoneBoost */, true, timeZoneMappings("Europe/London"), "test");
+ CountryTimeZones expectedFr = CountryTimeZones.createValidated("fr", "Europe/Paris",
+ false /* defaultTimeZoneBoost */, true, timeZoneMappings("Europe/Paris"), "test");
CountryZonesFinder countryZonesFinder = timeZoneFinder.getCountryZonesFinder();
assertEquals(list("gb", "fr"), countryZonesFinder.lookupAllCountryIsoCodes());
assertEquals(expectedGb, countryZonesFinder.lookupCountryTimeZones("gb"));
@@ -546,8 +571,8 @@
+ " </countryzones>\n"
+ "</timezones>\n");
CountryTimeZones expectedCountryTimeZones = CountryTimeZones.createValidated(
- "gb", "Europe/London", true /* everUsesUtc */, timeZoneMappings("Europe/London"),
- "test");
+ "gb", "Europe/London", false /* defaultTimeZoneBoost */, true /* everUsesUtc */,
+ timeZoneMappings("Europe/London"), "test");
assertEquals(expectedCountryTimeZones, finder.lookupCountryTimeZones("gb"));
assertEquals(expectedCountryTimeZones, finder.lookupCountryTimeZones("GB"));
@@ -590,22 +615,6 @@
assertEquals(expectedIanaVersion, finder.getIanaVersion());
}
- private static void assertImmutableTimeZone(TimeZone timeZone) {
- try {
- timeZone.setRawOffset(1000);
- fail();
- } catch (UnsupportedOperationException expected) {
- }
- }
-
- private static <X> void assertImmutableList(List<X> list) {
- try {
- list.add(null);
- fail();
- } catch (UnsupportedOperationException expected) {
- }
- }
-
private static void checkValidateThrowsParserException(String xml) {
try {
validate(xml);
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
index c3a6292..14d96eb 100644
--- a/mmodules/core_platform_api/api/platform/current-api.txt
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
@@ -1111,6 +1111,7 @@
public final class CountryTimeZones {
method public String getCountryIso();
method public android.icu.util.TimeZone getDefaultTimeZone();
+ method public boolean getDefaultTimeZoneBoost();
method public String getDefaultTimeZoneId();
method public java.util.List<libcore.timezone.CountryTimeZones.TimeZoneMapping> getEffectiveTimeZoneMappingsAt(long);
method public java.util.List<libcore.timezone.CountryTimeZones.TimeZoneMapping> getTimeZoneMappings();
diff --git a/mmodules/intracoreapi/Android.bp b/mmodules/intracoreapi/Android.bp
index 6775980..4212f7f 100644
--- a/mmodules/intracoreapi/Android.bp
+++ b/mmodules/intracoreapi/Android.bp
@@ -65,9 +65,7 @@
sdk_version: "none",
system_modules: "none",
- openjdk9: {
- javacflags: ["--patch-module=java.base=."],
- },
+ patch_module: "java.base",
}
// Used when compiling against art.module.intra.core.api.stubs.
diff --git a/non_openjdk_java_files.bp b/non_openjdk_java_files.bp
index c080fcf..4f7a33d 100644
--- a/non_openjdk_java_files.bp
+++ b/non_openjdk_java_files.bp
@@ -25,7 +25,6 @@
"dalvik/src/main/java/dalvik/annotation/TestTargetClass.java",
"dalvik/src/main/java/dalvik/annotation/Throws.java",
"dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java",
- "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
"dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java",
"dalvik/src/main/java/dalvik/annotation/optimization/DeadReferenceSafe.java",
"dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java",
@@ -51,13 +50,13 @@
"dalvik/src/main/java/dalvik/system/SocketTagger.java",
"dalvik/src/main/java/dalvik/system/TemporaryDirectory.java",
"dalvik/src/main/java/dalvik/system/VMDebug.java",
- "dalvik/src/main/java/dalvik/system/VersionCodes.java",
"dalvik/src/main/java/dalvik/system/ZygoteHooks.java",
"dalvik/src/main/java/org/apache/harmony/dalvik/NativeTestTarget.java",
"dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/Chunk.java",
"dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ChunkHandler.java",
"dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java",
"dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmVmInternal.java",
+ ":hidden_api_surface_annotation_files",
],
path: "dalvik/src/main",
visibility: ["//visibility:private"],
@@ -98,6 +97,36 @@
visibility: ["//visibility:private"],
}
+// The set of annotations used for defining visible (i.e. not hidden) API
+// surfaces.
+filegroup {
+ name: "visible_api_surface_annotation_files",
+ srcs: [
+ "luni/src/main/java/libcore/api/CorePlatformApi.java",
+ "luni/src/main/java/libcore/api/Hide.java",
+ "luni/src/main/java/libcore/api/IntraCoreApi.java",
+ ],
+}
+
+// The set of annotations used for defining the hidden API surface.
+filegroup {
+ name: "hidden_api_surface_annotation_files",
+ srcs: [
+ "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
+ "dalvik/src/main/java/dalvik/system/VersionCodes.java",
+ ],
+}
+
+// The set of annotations used for defining all API surfaces, including hidden
+// APIs.
+filegroup {
+ name: "api_surface_annotation_files",
+ srcs: [
+ ":hidden_api_surface_annotation_files",
+ ":visible_api_surface_annotation_files",
+ ],
+}
+
filegroup {
name: "non_openjdk_javadoc_luni_files",
srcs: [
@@ -209,9 +238,6 @@
"luni/src/main/java/javax/xml/xpath/XPathFunctionException.java",
"luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java",
"luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java",
- "luni/src/main/java/libcore/api/CorePlatformApi.java",
- "luni/src/main/java/libcore/api/Hide.java",
- "luni/src/main/java/libcore/api/IntraCoreApi.java",
"luni/src/main/java/libcore/content/type/MimeMap.java",
"luni/src/main/java/libcore/icu/DateIntervalFormat.java",
"luni/src/main/java/libcore/icu/ICU.java",
@@ -323,6 +349,7 @@
"luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java",
"luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java",
"luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java",
+ ":visible_api_surface_annotation_files",
],
path: "luni/src/main",
visibility: ["//visibility:private"],
diff --git a/ojluni/src/main/java/java/awt/font/TEST_MAPPING b/ojluni/src/main/java/java/awt/font/TEST_MAPPING
index 08d4188..a23d298 100644
--- a/ojluni/src/main/java/java/awt/font/TEST_MAPPING
+++ b/ojluni/src/main/java/java/awt/font/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/beans/TEST_MAPPING b/ojluni/src/main/java/java/beans/TEST_MAPPING
index 93fff5b..0e669a8 100644
--- a/ojluni/src/main/java/java/beans/TEST_MAPPING
+++ b/ojluni/src/main/java/java/beans/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/io/TEST_MAPPING b/ojluni/src/main/java/java/io/TEST_MAPPING
index c70c8cc..6eb3bd7 100644
--- a/ojluni/src/main/java/java/io/TEST_MAPPING
+++ b/ojluni/src/main/java/java/io/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/lang/annotation/TEST_MAPPING b/ojluni/src/main/java/java/lang/annotation/TEST_MAPPING
index 4b5bc6b..f5f6365 100644
--- a/ojluni/src/main/java/java/lang/annotation/TEST_MAPPING
+++ b/ojluni/src/main/java/java/lang/annotation/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/lang/reflect/TEST_MAPPING b/ojluni/src/main/java/java/lang/reflect/TEST_MAPPING
index 7013f76..2d13e0a 100644
--- a/ojluni/src/main/java/java/lang/reflect/TEST_MAPPING
+++ b/ojluni/src/main/java/java/lang/reflect/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/nio/channels/TEST_MAPPING b/ojluni/src/main/java/java/nio/channels/TEST_MAPPING
index 0352abb..dfb741c 100644
--- a/ojluni/src/main/java/java/nio/channels/TEST_MAPPING
+++ b/ojluni/src/main/java/java/nio/channels/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/nio/channels/spi/TEST_MAPPING b/ojluni/src/main/java/java/nio/channels/spi/TEST_MAPPING
index f3673a8..7974b9a 100644
--- a/ojluni/src/main/java/java/nio/channels/spi/TEST_MAPPING
+++ b/ojluni/src/main/java/java/nio/channels/spi/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/nio/file/TEST_MAPPING b/ojluni/src/main/java/java/nio/file/TEST_MAPPING
index eb0b296..24bd29a 100644
--- a/ojluni/src/main/java/java/nio/file/TEST_MAPPING
+++ b/ojluni/src/main/java/java/nio/file/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/nio/file/attribute/TEST_MAPPING b/ojluni/src/main/java/java/nio/file/attribute/TEST_MAPPING
index 143c92c..b6c90d4 100644
--- a/ojluni/src/main/java/java/nio/file/attribute/TEST_MAPPING
+++ b/ojluni/src/main/java/java/nio/file/attribute/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/nio/file/spi/TEST_MAPPING b/ojluni/src/main/java/java/nio/file/spi/TEST_MAPPING
index 49b6e63..632f30c 100644
--- a/ojluni/src/main/java/java/nio/file/spi/TEST_MAPPING
+++ b/ojluni/src/main/java/java/nio/file/spi/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/security/TEST_MAPPING b/ojluni/src/main/java/java/security/TEST_MAPPING
index f26952a..53b2818 100644
--- a/ojluni/src/main/java/java/security/TEST_MAPPING
+++ b/ojluni/src/main/java/java/security/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/security/acl/TEST_MAPPING b/ojluni/src/main/java/java/security/acl/TEST_MAPPING
index ead5724..864ca28 100644
--- a/ojluni/src/main/java/java/security/acl/TEST_MAPPING
+++ b/ojluni/src/main/java/java/security/acl/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/security/cert/TEST_MAPPING b/ojluni/src/main/java/java/security/cert/TEST_MAPPING
index 20d60b4..267b914 100644
--- a/ojluni/src/main/java/java/security/cert/TEST_MAPPING
+++ b/ojluni/src/main/java/java/security/cert/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/security/interfaces/TEST_MAPPING b/ojluni/src/main/java/java/security/interfaces/TEST_MAPPING
index fccf776..3c28d51 100644
--- a/ojluni/src/main/java/java/security/interfaces/TEST_MAPPING
+++ b/ojluni/src/main/java/java/security/interfaces/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/security/spec/TEST_MAPPING b/ojluni/src/main/java/java/security/spec/TEST_MAPPING
index aad544b..f54aac6 100644
--- a/ojluni/src/main/java/java/security/spec/TEST_MAPPING
+++ b/ojluni/src/main/java/java/security/spec/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/sql/TEST_MAPPING b/ojluni/src/main/java/java/sql/TEST_MAPPING
index 3e39e62..28cf3b3 100644
--- a/ojluni/src/main/java/java/sql/TEST_MAPPING
+++ b/ojluni/src/main/java/java/sql/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/text/TEST_MAPPING b/ojluni/src/main/java/java/text/TEST_MAPPING
index 35cfca5..30747b2 100644
--- a/ojluni/src/main/java/java/text/TEST_MAPPING
+++ b/ojluni/src/main/java/java/text/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/time/TEST_MAPPING b/ojluni/src/main/java/java/time/TEST_MAPPING
index f7e999f..5b24483 100644
--- a/ojluni/src/main/java/java/time/TEST_MAPPING
+++ b/ojluni/src/main/java/java/time/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/time/chrono/TEST_MAPPING b/ojluni/src/main/java/java/time/chrono/TEST_MAPPING
index c1ee236..461c15d 100644
--- a/ojluni/src/main/java/java/time/chrono/TEST_MAPPING
+++ b/ojluni/src/main/java/java/time/chrono/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/time/format/TEST_MAPPING b/ojluni/src/main/java/java/time/format/TEST_MAPPING
index 7ca2af8..42286e4 100644
--- a/ojluni/src/main/java/java/time/format/TEST_MAPPING
+++ b/ojluni/src/main/java/java/time/format/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/time/temporal/TEST_MAPPING b/ojluni/src/main/java/java/time/temporal/TEST_MAPPING
index e0ab39c..deac48a 100644
--- a/ojluni/src/main/java/java/time/temporal/TEST_MAPPING
+++ b/ojluni/src/main/java/java/time/temporal/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/time/zone/TEST_MAPPING b/ojluni/src/main/java/java/time/zone/TEST_MAPPING
index fe9e377..1c8c89e 100644
--- a/ojluni/src/main/java/java/time/zone/TEST_MAPPING
+++ b/ojluni/src/main/java/java/time/zone/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/TEST_MAPPING b/ojluni/src/main/java/java/util/TEST_MAPPING
index d67d653..e1434fb 100644
--- a/ojluni/src/main/java/java/util/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/concurrent/TEST_MAPPING b/ojluni/src/main/java/java/util/concurrent/TEST_MAPPING
index 7f26b61..5730a28 100644
--- a/ojluni/src/main/java/java/util/concurrent/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/concurrent/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreJsr166TestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/function/TEST_MAPPING b/ojluni/src/main/java/java/util/function/TEST_MAPPING
index 33c18dd..5840cf9 100644
--- a/ojluni/src/main/java/java/util/function/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/function/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/jar/TEST_MAPPING b/ojluni/src/main/java/java/util/jar/TEST_MAPPING
index b59ad7d..5b26443 100644
--- a/ojluni/src/main/java/java/util/jar/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/jar/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/logging/TEST_MAPPING b/ojluni/src/main/java/java/util/logging/TEST_MAPPING
index bcc3eab..85f4d2b 100644
--- a/ojluni/src/main/java/java/util/logging/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/logging/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/prefs/TEST_MAPPING b/ojluni/src/main/java/java/util/prefs/TEST_MAPPING
index 74bd06e..3a3445b 100644
--- a/ojluni/src/main/java/java/util/prefs/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/prefs/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/regex/TEST_MAPPING b/ojluni/src/main/java/java/util/regex/TEST_MAPPING
index a2bd15f..1bd44e2 100644
--- a/ojluni/src/main/java/java/util/regex/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/regex/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/stream/TEST_MAPPING b/ojluni/src/main/java/java/util/stream/TEST_MAPPING
index 68a9271..9673e09 100644
--- a/ojluni/src/main/java/java/util/stream/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/stream/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreOjTestCases",
"options": [
diff --git a/ojluni/src/main/java/java/util/zip/TEST_MAPPING b/ojluni/src/main/java/java/util/zip/TEST_MAPPING
index f9f0e88..52ac932 100644
--- a/ojluni/src/main/java/java/util/zip/TEST_MAPPING
+++ b/ojluni/src/main/java/java/util/zip/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/crypto/TEST_MAPPING b/ojluni/src/main/java/javax/crypto/TEST_MAPPING
index e6c5716..6860a5c 100644
--- a/ojluni/src/main/java/javax/crypto/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/crypto/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/crypto/interfaces/TEST_MAPPING b/ojluni/src/main/java/javax/crypto/interfaces/TEST_MAPPING
index 79e89d4..427bf79 100644
--- a/ojluni/src/main/java/javax/crypto/interfaces/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/crypto/interfaces/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/crypto/spec/TEST_MAPPING b/ojluni/src/main/java/javax/crypto/spec/TEST_MAPPING
index 2984ed2..d1e9d5a 100644
--- a/ojluni/src/main/java/javax/crypto/spec/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/crypto/spec/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/net/TEST_MAPPING b/ojluni/src/main/java/javax/net/TEST_MAPPING
index a05ba36..aeabde8 100644
--- a/ojluni/src/main/java/javax/net/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/net/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/net/ssl/TEST_MAPPING b/ojluni/src/main/java/javax/net/ssl/TEST_MAPPING
index 39589f4..d3ae570 100644
--- a/ojluni/src/main/java/javax/net/ssl/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/net/ssl/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/security/auth/TEST_MAPPING b/ojluni/src/main/java/javax/security/auth/TEST_MAPPING
index 90c80bc..45bd9c7 100644
--- a/ojluni/src/main/java/javax/security/auth/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/security/auth/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/security/auth/callback/TEST_MAPPING b/ojluni/src/main/java/javax/security/auth/callback/TEST_MAPPING
index 23af453..e742b17 100644
--- a/ojluni/src/main/java/javax/security/auth/callback/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/security/auth/callback/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/security/auth/login/TEST_MAPPING b/ojluni/src/main/java/javax/security/auth/login/TEST_MAPPING
index 03d7d03..a22e2b3 100644
--- a/ojluni/src/main/java/javax/security/auth/login/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/security/auth/login/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/security/auth/x500/TEST_MAPPING b/ojluni/src/main/java/javax/security/auth/x500/TEST_MAPPING
index 48aafe7..3ba13da 100644
--- a/ojluni/src/main/java/javax/security/auth/x500/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/security/auth/x500/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/security/cert/TEST_MAPPING b/ojluni/src/main/java/javax/security/cert/TEST_MAPPING
index 966b756..4603638 100644
--- a/ojluni/src/main/java/javax/security/cert/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/security/cert/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/javax/sql/TEST_MAPPING b/ojluni/src/main/java/javax/sql/TEST_MAPPING
index a5d3289..bbbb56c 100644
--- a/ojluni/src/main/java/javax/sql/TEST_MAPPING
+++ b/ojluni/src/main/java/javax/sql/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/invoke/util/TEST_MAPPING b/ojluni/src/main/java/sun/invoke/util/TEST_MAPPING
index ee2ddce..48ae161 100644
--- a/ojluni/src/main/java/sun/invoke/util/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/invoke/util/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/misc/TEST_MAPPING b/ojluni/src/main/java/sun/misc/TEST_MAPPING
index 3f3df57..f0d2cec 100644
--- a/ojluni/src/main/java/sun/misc/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/misc/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/net/util/TEST_MAPPING b/ojluni/src/main/java/sun/net/util/TEST_MAPPING
index 69fde07..068b5da 100644
--- a/ojluni/src/main/java/sun/net/util/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/net/util/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/security/jca/TEST_MAPPING b/ojluni/src/main/java/sun/security/jca/TEST_MAPPING
index ca53dcc..02e5a74 100644
--- a/ojluni/src/main/java/sun/security/jca/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/security/jca/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/security/pkcs/TEST_MAPPING b/ojluni/src/main/java/sun/security/pkcs/TEST_MAPPING
index fb418db..3f37df7 100644
--- a/ojluni/src/main/java/sun/security/pkcs/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/security/pkcs/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/security/x509/TEST_MAPPING b/ojluni/src/main/java/sun/security/x509/TEST_MAPPING
index eb113b5..92012a6 100644
--- a/ojluni/src/main/java/sun/security/x509/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/security/x509/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [
diff --git a/ojluni/src/main/java/sun/util/logging/TEST_MAPPING b/ojluni/src/main/java/sun/util/logging/TEST_MAPPING
index 795ec37..e3bb92a 100644
--- a/ojluni/src/main/java/sun/util/logging/TEST_MAPPING
+++ b/ojluni/src/main/java/sun/util/logging/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "CtsLibcoreTestCases",
"options": [