Revert "Fix tests"
This reverts commit 614899741cdd468747dbcfaeab9d70b014117dfb.
Revert "Desugared lib: SummaryStatisticsConversion"
This reverts commit 4cd906d40ae15a1ca46be1f70e450170128f6294.
Change-Id: I7244a4eb2c92a4e6a86e54ab6b020a944238e668
diff --git a/src/test/desugaredLibrary/conversions/DoubleSummaryStatisticsConversions.java b/src/test/desugaredLibrary/conversions/DoubleSummaryStatisticsConversions.java
deleted file mode 100644
index 1ad06e0..0000000
--- a/src/test/desugaredLibrary/conversions/DoubleSummaryStatisticsConversions.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package java.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
-public class DoubleSummaryStatisticsConversions {
-
- private static final Field JAVA_LONG_COUNT_FIELD;
- private static final Field JAVA_DOUBLE_SUM_FIELD;
- private static final Field JAVA_DOUBLE_MIN_FIELD;
- private static final Field JAVA_DOUBLE_MAX_FIELD;
- private static final Field JD_LONG_COUNT_FIELD;
- private static final Field JD_DOUBLE_SUM_FIELD;
- private static final Field JD_DOUBLE_MIN_FIELD;
- private static final Field JD_DOUBLE_MAX_FIELD;
-
- static {
- Class<?> javaDoubleSummaryStatisticsClass = java.util.DoubleSummaryStatistics.class;
- JAVA_LONG_COUNT_FIELD = getField(javaDoubleSummaryStatisticsClass, "count");
- JAVA_LONG_COUNT_FIELD.setAccessible(true);
- JAVA_DOUBLE_SUM_FIELD = getField(javaDoubleSummaryStatisticsClass, "sum");
- JAVA_DOUBLE_SUM_FIELD.setAccessible(true);
- JAVA_DOUBLE_MIN_FIELD = getField(javaDoubleSummaryStatisticsClass, "min");
- JAVA_DOUBLE_MIN_FIELD.setAccessible(true);
- JAVA_DOUBLE_MAX_FIELD = getField(javaDoubleSummaryStatisticsClass, "max");
- JAVA_DOUBLE_MAX_FIELD.setAccessible(true);
-
- Class<?> jdDoubleSummaryStatisticsClass = j$.util.DoubleSummaryStatistics.class;
- JD_LONG_COUNT_FIELD = getField(jdDoubleSummaryStatisticsClass, "count");
- JD_LONG_COUNT_FIELD.setAccessible(true);
- JD_DOUBLE_SUM_FIELD = getField(jdDoubleSummaryStatisticsClass, "sum");
- JD_DOUBLE_SUM_FIELD.setAccessible(true);
- JD_DOUBLE_MIN_FIELD = getField(jdDoubleSummaryStatisticsClass, "min");
- JD_DOUBLE_MIN_FIELD.setAccessible(true);
- JD_DOUBLE_MAX_FIELD = getField(jdDoubleSummaryStatisticsClass, "max");
- JD_DOUBLE_MAX_FIELD.setAccessible(true);
- }
-
- private static Field getField(Class<?> clazz, String name) {
- try {
- return clazz.getDeclaredField(name);
- } catch (NoSuchFieldException e) {
- throw new Error("Failed summary statistics set-up.", e);
- }
- }
-
- public static j$.util.DoubleSummaryStatistics convert(java.util.DoubleSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- j$.util.DoubleSummaryStatistics newInstance = new j$.util.DoubleSummaryStatistics();
- try {
- JD_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JD_DOUBLE_SUM_FIELD.set(newInstance, stats.getSum());
- JD_DOUBLE_MIN_FIELD.set(newInstance, stats.getMin());
- JD_DOUBLE_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-
- public static java.util.DoubleSummaryStatistics convert(j$.util.DoubleSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- java.util.DoubleSummaryStatistics newInstance = new java.util.DoubleSummaryStatistics();
- try {
- JAVA_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JAVA_DOUBLE_SUM_FIELD.set(newInstance, stats.getSum());
- JAVA_DOUBLE_MIN_FIELD.set(newInstance, stats.getMin());
- JAVA_DOUBLE_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-}
diff --git a/src/test/desugaredLibrary/conversions/IntSummaryStatisticsConversions.java b/src/test/desugaredLibrary/conversions/IntSummaryStatisticsConversions.java
deleted file mode 100644
index 8351704..0000000
--- a/src/test/desugaredLibrary/conversions/IntSummaryStatisticsConversions.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package java.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
-public class IntSummaryStatisticsConversions {
-
- private static final Field JAVA_LONG_COUNT_FIELD;
- private static final Field JAVA_LONG_SUM_FIELD;
- private static final Field JAVA_INT_MIN_FIELD;
- private static final Field JAVA_INT_MAX_FIELD;
- private static final Field JD_LONG_COUNT_FIELD;
- private static final Field JD_LONG_SUM_FIELD;
- private static final Field JD_INT_MIN_FIELD;
- private static final Field JD_INT_MAX_FIELD;
-
- static {
- Class<?> javaIntSummaryStatisticsClass = java.util.IntSummaryStatistics.class;
- JAVA_LONG_COUNT_FIELD = getField(javaIntSummaryStatisticsClass, "count");
- JAVA_LONG_COUNT_FIELD.setAccessible(true);
- JAVA_LONG_SUM_FIELD = getField(javaIntSummaryStatisticsClass, "sum");
- JAVA_LONG_SUM_FIELD.setAccessible(true);
- JAVA_INT_MIN_FIELD = getField(javaIntSummaryStatisticsClass, "min");
- JAVA_INT_MIN_FIELD.setAccessible(true);
- JAVA_INT_MAX_FIELD = getField(javaIntSummaryStatisticsClass, "max");
- JAVA_INT_MAX_FIELD.setAccessible(true);
-
- Class<?> jdIntSummaryStatisticsClass = j$.util.IntSummaryStatistics.class;
- JD_LONG_COUNT_FIELD = getField(jdIntSummaryStatisticsClass, "count");
- JD_LONG_COUNT_FIELD.setAccessible(true);
- JD_LONG_SUM_FIELD = getField(jdIntSummaryStatisticsClass, "sum");
- JD_LONG_SUM_FIELD.setAccessible(true);
- JD_INT_MIN_FIELD = getField(jdIntSummaryStatisticsClass, "min");
- JD_INT_MIN_FIELD.setAccessible(true);
- JD_INT_MAX_FIELD = getField(jdIntSummaryStatisticsClass, "max");
- JD_INT_MAX_FIELD.setAccessible(true);
- }
-
- private static Field getField(Class<?> clazz, String name) {
- try {
- return clazz.getDeclaredField(name);
- } catch (NoSuchFieldException e) {
- throw new Error("Failed summary statistics set-up.", e);
- }
- }
-
- public static j$.util.IntSummaryStatistics convert(java.util.IntSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- j$.util.IntSummaryStatistics newInstance = new j$.util.IntSummaryStatistics();
- try {
- JD_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JD_LONG_SUM_FIELD.set(newInstance, stats.getSum());
- JD_INT_MIN_FIELD.set(newInstance, stats.getMin());
- JD_INT_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-
- public static java.util.IntSummaryStatistics convert(j$.util.IntSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- java.util.IntSummaryStatistics newInstance = new java.util.IntSummaryStatistics();
- try {
- JAVA_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JAVA_LONG_SUM_FIELD.set(newInstance, stats.getSum());
- JAVA_INT_MIN_FIELD.set(newInstance, stats.getMin());
- JAVA_INT_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-}
diff --git a/src/test/desugaredLibrary/conversions/LongSummaryStatisticsConversions.java b/src/test/desugaredLibrary/conversions/LongSummaryStatisticsConversions.java
deleted file mode 100644
index 7096a2a..0000000
--- a/src/test/desugaredLibrary/conversions/LongSummaryStatisticsConversions.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package java.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
-public class LongSummaryStatisticsConversions {
-
- private static final Field JAVA_LONG_COUNT_FIELD;
- private static final Field JAVA_LONG_SUM_FIELD;
- private static final Field JAVA_LONG_MIN_FIELD;
- private static final Field JAVA_LONG_MAX_FIELD;
- private static final Field JD_LONG_COUNT_FIELD;
- private static final Field JD_LONG_SUM_FIELD;
- private static final Field JD_LONG_MIN_FIELD;
- private static final Field JD_LONG_MAX_FIELD;
-
- static {
- Class<?> javaLongSummaryStatisticsClass = java.util.LongSummaryStatistics.class;
- JAVA_LONG_COUNT_FIELD = getField(javaLongSummaryStatisticsClass, "count");
- JAVA_LONG_COUNT_FIELD.setAccessible(true);
- JAVA_LONG_SUM_FIELD = getField(javaLongSummaryStatisticsClass, "sum");
- JAVA_LONG_SUM_FIELD.setAccessible(true);
- JAVA_LONG_MIN_FIELD = getField(javaLongSummaryStatisticsClass, "min");
- JAVA_LONG_MIN_FIELD.setAccessible(true);
- JAVA_LONG_MAX_FIELD = getField(javaLongSummaryStatisticsClass, "max");
- JAVA_LONG_MAX_FIELD.setAccessible(true);
-
- Class<?> jdLongSummaryStatisticsClass = j$.util.LongSummaryStatistics.class;
- JD_LONG_COUNT_FIELD = getField(jdLongSummaryStatisticsClass, "count");
- JD_LONG_COUNT_FIELD.setAccessible(true);
- JD_LONG_SUM_FIELD = getField(jdLongSummaryStatisticsClass, "sum");
- JD_LONG_SUM_FIELD.setAccessible(true);
- JD_LONG_MIN_FIELD = getField(jdLongSummaryStatisticsClass, "min");
- JD_LONG_MIN_FIELD.setAccessible(true);
- JD_LONG_MAX_FIELD = getField(jdLongSummaryStatisticsClass, "max");
- JD_LONG_MAX_FIELD.setAccessible(true);
- }
-
- private static Field getField(Class<?> clazz, String name) {
- try {
- return clazz.getDeclaredField(name);
- } catch (NoSuchFieldException e) {
- throw new Error("Failed summary statistics set-up.", e);
- }
- }
-
- public static j$.util.LongSummaryStatistics convert(java.util.LongSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- j$.util.LongSummaryStatistics newInstance = new j$.util.LongSummaryStatistics();
- try {
- JD_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JD_LONG_SUM_FIELD.set(newInstance, stats.getSum());
- JD_LONG_MIN_FIELD.set(newInstance, stats.getMin());
- JD_LONG_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-
- public static java.util.LongSummaryStatistics convert(j$.util.LongSummaryStatistics stats) {
- if (stats == null) {
- return null;
- }
- java.util.LongSummaryStatistics newInstance = new java.util.LongSummaryStatistics();
- try {
- JAVA_LONG_COUNT_FIELD.set(newInstance, stats.getCount());
- JAVA_LONG_SUM_FIELD.set(newInstance, stats.getSum());
- JAVA_LONG_MIN_FIELD.set(newInstance, stats.getMin());
- JAVA_LONG_MAX_FIELD.set(newInstance, stats.getMax());
- } catch (IllegalAccessException e) {
- throw new Error("Failed summary statistics conversion.", e);
- }
- return newInstance;
- }
-}
diff --git a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/DoubleSummaryStatistics.java b/src/test/desugaredLibrary/stubs/summarystatisticsstubs/DoubleSummaryStatistics.java
deleted file mode 100644
index 33710da..0000000
--- a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/DoubleSummaryStatistics.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package j$.util;
-
-public class DoubleSummaryStatistics {
-
- public long getCount() {
- return 0L;
- }
-
- public double getSum() {
- return 0.0;
- }
-
- public double getMin() {
- return 0.0;
- }
-
- public double getMax() {
- return 0.0;
- }
-}
diff --git a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/IntSummaryStatistics.java b/src/test/desugaredLibrary/stubs/summarystatisticsstubs/IntSummaryStatistics.java
deleted file mode 100644
index 2359f8d..0000000
--- a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/IntSummaryStatistics.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package j$.util;
-
-public class IntSummaryStatistics {
-
- public long getCount() {
- return 0;
- }
-
- public long getSum() {
- return 0;
- }
-
- public int getMin() {
- return 0;
- }
-
- public int getMax() {
- return 0;
- }
-}
diff --git a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/LongSummaryStatistics.java b/src/test/desugaredLibrary/stubs/summarystatisticsstubs/LongSummaryStatistics.java
deleted file mode 100644
index bd993b0..0000000
--- a/src/test/desugaredLibrary/stubs/summarystatisticsstubs/LongSummaryStatistics.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package j$.util;
-
-public class LongSummaryStatistics {
-
- public long getCount() {
- return 0L;
- }
-
- public long getSum() {
- return 0L;
- }
-
- public long getMin() {
- return 0L;
- }
-
- public long getMax() {
- return 0L;
- }
-}
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/APIConversionFinalWarningTest.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/APIConversionFinalWarningTest.java
new file mode 100644
index 0000000..752c2e6
--- /dev/null
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/APIConversionFinalWarningTest.java
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+package com.android.tools.r8.desugar.desugaredlibrary.conversiontests;
+
+import static org.hamcrest.CoreMatchers.startsWith;
+
+import com.android.tools.r8.TestRuntime.DexRuntime;
+import com.android.tools.r8.ToolHelper.DexVm;
+import com.android.tools.r8.utils.AndroidApiLevel;
+import com.android.tools.r8.utils.StringUtils;
+import java.nio.file.Path;
+import java.util.LongSummaryStatistics;
+import org.junit.Test;
+
+public class APIConversionFinalWarningTest extends APIConversionTestBase {
+
+ @Test
+ public void testFinalMethod() throws Exception {
+ Path customLib = testForD8().addProgramClasses(CustomLibClass.class).compile().writeToZip();
+ testForD8()
+ .setMinApi(AndroidApiLevel.B)
+ .addProgramClasses(Executor.class)
+ .addLibraryClasses(CustomLibClass.class)
+ .enableCoreLibraryDesugaring(AndroidApiLevel.B)
+ .compile()
+ .assertInfoMessageThatMatches(
+ startsWith(
+ "Desugared library API conversion: cannot wrap final methods"
+ + " [java.util.LongSummaryStatistics"))
+ .addDesugaredCoreLibraryRunClassPath(
+ this::buildDesugaredLibraryWithConversionExtension, AndroidApiLevel.B)
+ .addRunClasspathFiles(customLib)
+ .run(new DexRuntime(DexVm.ART_9_0_0_HOST), Executor.class)
+ .assertSuccessWithOutput(
+ StringUtils.lines(
+ "Unsupported conversion for java.util.LongSummaryStatistics. See compilation time"
+ + " infos for more details."));
+ }
+
+ static class Executor {
+
+ public static void main(String[] args) {
+ LongSummaryStatistics statistics = new LongSummaryStatistics();
+ statistics.accept(3L);
+ try {
+ makeCall(statistics);
+ } catch (RuntimeException e) {
+ System.out.println(e.getMessage());
+ }
+ }
+
+ @SuppressWarnings("ResultOfMethodCallIgnored")
+ static void makeCall(LongSummaryStatistics statistics) {
+ CustomLibClass.call(statistics);
+ }
+ }
+
+ // This class will be put at compilation time as library and on the runtime class path.
+ // This class is convenient for easy testing. Each method plays the role of methods in the
+ // platform APIs for which argument/return values need conversion.
+ static class CustomLibClass {
+
+ public static long call(LongSummaryStatistics stats) {
+ return stats.getMax();
+ }
+ }
+}
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/SummaryStatisticsConversionTest.java b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/SummaryStatisticsConversionTest.java
deleted file mode 100644
index 3e65742..0000000
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/conversiontests/SummaryStatisticsConversionTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.android.tools.r8.desugar.desugaredlibrary.conversiontests;
-
-import com.android.tools.r8.TestParameters;
-import com.android.tools.r8.TestParametersCollection;
-import com.android.tools.r8.ToolHelper.DexVm.Version;
-import com.android.tools.r8.utils.StringUtils;
-import java.nio.file.Path;
-import java.util.Arrays;
-import java.util.DoubleSummaryStatistics;
-import java.util.IntSummaryStatistics;
-import java.util.LongSummaryStatistics;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class SummaryStatisticsConversionTest extends APIConversionTestBase {
-
- private final TestParameters parameters;
-
- @Parameters(name = "{0}")
- public static TestParametersCollection data() {
- // Below 7 XXXSummaryStatistics are not present and conversions are pointless.
- return getTestParameters()
- .withDexRuntimesStartingFromIncluding(Version.V7_0_0)
- .withAllApiLevels()
- .build();
- }
-
- public SummaryStatisticsConversionTest(TestParameters parameters) {
- this.parameters = parameters;
- }
-
- @Test
- public void testStats() throws Exception {
- Path customLib =
- testForD8()
- .setMinApi(parameters.getApiLevel())
- .addProgramClasses(CustomLibClass.class)
- .compile()
- .writeToZip();
- testForD8()
- .setMinApi(parameters.getApiLevel())
- .addProgramClasses(Executor.class)
- .addLibraryClasses(CustomLibClass.class)
- .enableCoreLibraryDesugaring(parameters.getApiLevel())
- .compile()
- .addDesugaredCoreLibraryRunClassPath(
- this::buildDesugaredLibraryWithConversionExtension, parameters.getApiLevel())
- .addRunClasspathFiles(customLib)
- .run(parameters.getRuntime(), Executor.class)
- .assertSuccessWithOutput(
- StringUtils.lines(
- "2", "1", "42", "42", "42", "1", "42", "42", "42", "1", "42.0", "42.0", "42.0"));
- }
-
- static class Executor {
-
- public static void main(String[] args) {
- // The realTest represents scenario applicable in Android apps, subsequent tests use
- // mocked CustomLib to ensure all cases are correct.
- realTest();
- longTest();
- intTest();
- doubleTest();
- }
-
- private static void realTest() {
- System.out.println("foo".subSequence(0, 2).codePoints().summaryStatistics().getCount());
- }
-
- public static void longTest() {
- long[] longs = new long[1];
- longs[0] = 42L;
- LongSummaryStatistics mix =
- CustomLibClass.mix(Arrays.stream(longs).summaryStatistics(), new LongSummaryStatistics());
- System.out.println(mix.getCount());
- System.out.println(mix.getMin());
- System.out.println(mix.getMax());
- System.out.println(mix.getSum());
- }
-
- public static void intTest() {
- int[] ints = new int[1];
- ints[0] = 42;
- IntSummaryStatistics mix =
- CustomLibClass.mix(Arrays.stream(ints).summaryStatistics(), new IntSummaryStatistics());
- System.out.println(mix.getCount());
- System.out.println(mix.getMin());
- System.out.println(mix.getMax());
- System.out.println(mix.getSum());
- }
-
- public static void doubleTest() {
- double[] doubles = new double[1];
- doubles[0] = 42L;
- DoubleSummaryStatistics mix =
- CustomLibClass.mix(
- Arrays.stream(doubles).summaryStatistics(), new DoubleSummaryStatistics());
- System.out.println(mix.getCount());
- System.out.println(mix.getMin());
- System.out.println(mix.getMax());
- System.out.println(mix.getSum());
- }
- }
-
- // This class will be put at compilation time as library and on the runtime class path.
- // This class is convenient for easy testing. Each method plays the role of methods in the
- // platform APIs for which argument/return values need conversion.
- static class CustomLibClass {
-
- public static LongSummaryStatistics mix(
- LongSummaryStatistics stats1, LongSummaryStatistics stats2) {
- return stats1;
- }
-
- public static IntSummaryStatistics mix(
- IntSummaryStatistics stats1, IntSummaryStatistics stats2) {
- return stats1;
- }
-
- public static DoubleSummaryStatistics mix(
- DoubleSummaryStatistics stats1, DoubleSummaryStatistics stats2) {
- return stats1;
- }
- }
-}
diff --git a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/desugar_jdk_libs.json b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/desugar_jdk_libs.json
index 6e791b6..ab1a617 100644
--- a/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/desugar_jdk_libs.json
+++ b/src/test/java/com/android/tools/r8/desugar/desugaredlibrary/desugar_jdk_libs.json
@@ -1,6 +1,6 @@
{
"configuration_format_version": 2,
- "version": "0.8.0",
+ "version": "0.7.0",
"required_compilation_api_level": 26,
"library_flags": [
{
@@ -21,9 +21,6 @@
"api_level_below_or_equal": 23,
"rewrite_prefix": {
"j$.util.Optional": "java.util.Optional",
- "j$.util.LongSummaryStatistics": "java.util.LongSummaryStatistics",
- "j$.util.IntSummaryStatistics": "java.util.IntSummaryStatistics",
- "j$.util.DoubleSummaryStatistics": "java.util.DoubleSummaryStatistics",
"java.util.stream.": "j$.util.stream.",
"java.util.function.": "j$.util.function.",
"java.util.Comparators": "j$.util.Comparators",
@@ -137,10 +134,7 @@
"java.util.Optional": "j$.util.OptionalConversions",
"java.util.OptionalDouble": "j$.util.OptionalConversions",
"java.util.OptionalInt": "j$.util.OptionalConversions",
- "java.util.OptionalLong": "j$.util.OptionalConversions",
- "java.util.LongSummaryStatistics": "j$.util.LongSummaryStatisticsConversions",
- "java.util.IntSummaryStatistics": "j$.util.IntSummaryStatisticsConversions",
- "java.util.DoubleSummaryStatistics": "j$.util.DoubleSummaryStatisticsConversions"
+ "java.util.OptionalLong": "j$.util.OptionalConversions"
}
}
],
@@ -149,9 +143,6 @@
"-keepclassmembers class j$.util.concurrent.ConcurrentHashMap { int sizeCtl; int transferIndex; long baseCount; int cellsBusy; }",
"-keepclassmembers class j$.util.concurrent.ConcurrentHashMap$CounterCell { long value; }",
"-keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); }",
- "-keeppackagenames j$",
- "-keepclassmembers class j$.util.IntSummaryStatistics { long count; long sum; int min; int max; }",
- "-keepclassmembers class j$.util.LongSummaryStatistics { long count; long sum; long min; long max; }",
- "-keepclassmembers class j$.util.DoubleSummaryStatistics { long count; double sum; double min; double max; }"
+ "-keeppackagenames j$"
]
}