Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.NullTypeAnnotationTest.testBug499589BTB - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 4 builds (Since #6 )
Took 0.74 sec.

Error Message

testBug499589BTB - Javac found warning(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
test/X.java:26: warning: [rawtypes] found raw type: Ref\n
 public final Ref<String[][]>[][] genericField = new Ref[0][];\n
                                                     ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:27: warning: [rawtypes] found raw type: Ref\n
 public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];\n
                                                                                      ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:28: warning: [rawtypes] found raw type: Ref\n
 public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];\n
                                                                                        ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
3 warnings\n

--------- Difference is ----------
 expected:<[]> but was:<[test/X.java:26: warning: [rawtypes] found raw type: Ref\n
 public final Ref<String[][]>[][] genericField = new Ref[0][];\n
                                                     ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:27: warning: [rawtypes] found raw type: Ref\n
 public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];\n
                                                                                      ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:28: warning: [rawtypes] found raw type: Ref\n
 public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];\n
                                                                                        ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
3 warnings\n
]>

Stacktrace

junit.framework.ComparisonFailure: testBug499589BTB - Javac found warning(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
test/X.java:26: warning: [rawtypes] found raw type: Ref\n
	public final Ref<String[][]>[][] genericField = new Ref[0][];\n
	                                                    ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:27: warning: [rawtypes] found raw type: Ref\n
	public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];\n
	                                                                                     ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:28: warning: [rawtypes] found raw type: Ref\n
	public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];\n
	                                                                                       ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
3 warnings\n

--------- Difference is ----------
 expected:<[]> but was:<[test/X.java:26: warning: [rawtypes] found raw type: Ref\n
	public final Ref<String[][]>[][] genericField = new Ref[0][];\n
	                                                    ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:27: warning: [rawtypes] found raw type: Ref\n
	public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];\n
	                                                                                     ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
test/X.java:28: warning: [rawtypes] found raw type: Ref\n
	public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];\n
	                                                                                       ^\n
  missing type arguments for generic class Ref<T>\n
  where T is a type-variable:\n
    T extends Object declared in class Ref\n
3 warnings\n
]>
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:260)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:236)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runJavac(AbstractRegressionTest.java:2064)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2814)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2539)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runConformTest(AbstractRegressionTest.java:3028)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractNullAnnotationTest.runConformTestWithLibs(AbstractNullAnnotationTest.java:183)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractNullAnnotationTest.runConformTestWithLibs(AbstractNullAnnotationTest.java:165)
	at org.eclipse.jdt.core.tests.compiler.regression.NullTypeAnnotationTest.testBug499589BTB(NullTypeAnnotationTest.java:14659)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.NullTypeAnnotationTest#testBug499589BTB - 1.8
test/Ref.java [
package test;

public class Ref<T> {
	T get() {
		throw new RuntimeException();
	}
}

]
test/X.java [
package test;

import static org.eclipse.jdt.annotation.DefaultLocation.ARRAY_CONTENTS;
import static org.eclipse.jdt.annotation.DefaultLocation.FIELD;
import static org.eclipse.jdt.annotation.DefaultLocation.PARAMETER;
import static org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPE;
import static org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENT;

import org.eclipse.jdt.annotation.*;

@SuppressWarnings({ "unchecked" })
@NonNullByDefault({ FIELD, RETURN_TYPE, PARAMETER, ARRAY_CONTENTS, TYPE_ARGUMENT })
public abstract class X {
	public final String[][] field = {};
	public final @Nullable String[][] fieldWithNullable1 = {};
	public final String[] @Nullable [] fieldWithNullable2 = {};

	public final Ref<String[][]> list = new Ref<>();
	public final Ref<@Nullable String[][]> listWithNullable1 = new Ref<>();
	public final Ref<String[] @Nullable []> listWithNullable2 = new Ref<>();

	public abstract String[][] method();
	public abstract @Nullable String[][] methodWithNullable1();
	public abstract String[] @Nullable [] methodWithNullable2();

	public final Ref<String[][]>[][] genericField = new Ref[0][];
	public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];
	public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];
}

]


Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt

Standard Error

--- javac err: ---
test/X.java:26: warning: [rawtypes] found raw type: Ref
	public final Ref<String[][]>[][] genericField = new Ref[0][];
	                                                    ^
  missing type arguments for generic class Ref<T>
  where T is a type-variable:
    T extends Object declared in class Ref
test/X.java:27: warning: [rawtypes] found raw type: Ref
	public final @Nullable Ref<@Nullable String[][]>[][] genericFieldWithNullable1 = new Ref[0][];
	                                                                                     ^
  missing type arguments for generic class Ref<T>
  where T is a type-variable:
    T extends Object declared in class Ref
test/X.java:28: warning: [rawtypes] found raw type: Ref
	public final Ref<String[] @Nullable []>[] @Nullable [] genericFieldWithNullable2 = new Ref[0][];
	                                                                                       ^
  missing type arguments for generic class Ref<T>
  where T is a type-variable:
    T extends Object declared in class Ref
3 warnings

----------------------------------------