From f9153fc8bb733206a5d6995429cac2f9e9c3d269 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Fri, 11 Sep 2026 10:01:35 -0700 Subject: [PATCH] Skip more tests under Java 8. Apparently these tests have just silently not been running externally since (probably?) https://github.com/google/auto/commit/c8a5c198036cd4e138dc3424200f12a4e79b532c (which was for https://github.com/google/auto/issues/1075). That will be fixed by https://github.com/google/auto/pull/2134, which upgrades us to a fixed version of Surefire. RELNOTES=n/a PiperOrigin-RevId: 979876879 --- .../test/java/com/google/auto/value/AutoValueJava8Test.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/value/src/it/functional/src/test/java/com/google/auto/value/AutoValueJava8Test.java b/value/src/it/functional/src/test/java/com/google/auto/value/AutoValueJava8Test.java index dcef422af3..11229dc8ab 100644 --- a/value/src/it/functional/src/test/java/com/google/auto/value/AutoValueJava8Test.java +++ b/value/src/it/functional/src/test/java/com/google/auto/value/AutoValueJava8Test.java @@ -344,6 +344,7 @@ interface Builder { @Test public void testInheritedGetterRemainsNullable() throws NoSuchMethodException { + assumeTrue(javacHandlesTypeAnnotationsCorrectly); // Ensure that the implementation has `@Nullable String thing()`. StringThing instance = new AutoValue_AutoValueJava8Test_StringThing(null); Method getter = instance.getClass().getDeclaredMethod("thing"); @@ -352,6 +353,7 @@ public void testInheritedGetterRemainsNullable() throws NoSuchMethodException { @Test public void testInheritedBuilderGetterRemainsNullable() throws NoSuchMethodException { + assumeTrue(javacHandlesTypeAnnotationsCorrectly); StringThingWithBuilder instance = StringThingWithBuilder.builder().setThing(null).build(); Method getter = instance.getClass().getDeclaredMethod("thing"); assertThat(getter.getAnnotatedReturnType().getAnnotations()).asList().contains(nullable()); @@ -1211,6 +1213,7 @@ public abstract static class Builder { @Test public void typeParameterBuilderFieldsAreNullable() throws ReflectiveOperationException { + assumeTrue(javacHandlesTypeAnnotationsCorrectly); assertThrows(NullPointerException.class, () -> NotNullableVariableBound.builder().setT(null)); // Even though neither t() nor string() has a @Nullable return type, the corresponding builder