diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
index 143df0f..ec15be3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
@@ -32822,19 +32822,29 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=140643
 public void test0987() {
 	String expectedOutput = new CompilerOptions(getCompilerOptions()).sourceLevel < ClassFileConstants.JDK1_6
-    ?	"----------\n" + 
-		"1. ERROR in X.java (at line 11)\n" + 
+    ?	"----------\n" +
+		"1. ERROR in X.java (at line 7)\n" + 
+		"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
+		"	               ^^^^^^^^^^^^^^^^\n" + 
+		"The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	       ^^^^^^^^^^^^\n" + 
 		"The return type is incompatible with EditPart.getViewer()\n" + 
 		"----------\n" + 
-		"2. ERROR in X.java (at line 11)\n" + 
+		"3. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	                    ^^^^^^^^^^^\n" + 
 		"The method getViewer() of type AbstractLinkView<M> must override a superclass method\n" + 
 		"----------\n"
-    :		"----------\n" + 
-		"1. ERROR in X.java (at line 11)\n" + 
+    :	"----------\n" + 
+		"1. ERROR in X.java (at line 7)\n" + 
+		"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
+		"	               ^^^^^^^^^^^^^^^^\n" + 
+		"The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	       ^^^^^^^^^^^^\n" + 
 		"The return type is incompatible with EditPart.getViewer()\n" + 
@@ -32923,7 +32933,12 @@
 				"}", // =================
 			},
 			"----------\n" +
-			"1. ERROR in X.java (at line 11)\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
+			"	               ^^^^^^^^^^^^^^^^\n" + 
+			"The return types are incompatible for the inherited methods ILinkViewElement.getViewer(), EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 11)\n" + 
 			"	public SheetViewer getViewer() { return null; }	\n" + 
 			"	       ^^^^^^^^^^^\n" + 
 			"The return type is incompatible with AbstractEditPart.getViewer()\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
index 77ec587..e0a5a0d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
@@ -3197,4 +3197,42 @@
 			"}"
 	});
 }
+public void testBug437007() {
+	runConformTest(
+		new String[] {
+			"ExecutorTests.java",
+			"import java.util.*;\n" + 
+			"\n" + 
+			"public class ExecutorTests {\n" + 
+			"    List<Runnable> tasks = Arrays.asList(\n" + 
+			"            () -> {\n" + 
+			"                System.out.println(\"task1 start\");\n" + 
+			"            }\n" + 
+			"    );\n" + 
+			"\n" + 
+			"    public void executeInSync(){\n" + 
+			"        tasks.stream().forEach(Runnable::run);\n" + 
+			"    }\n" + 
+			"}\n"
+		});
+}
+public void testBug435689() {
+	runConformTest(
+		new String[] {
+			"Test.java",
+			"import java.util.function.*;\n" +
+			"class Foo<T> {\n" + 
+			"  <U> void apply(Function<T, Consumer<U>> bar) {}\n" + 
+			"}\n" + 
+			"\n" + 
+			"class Bar {\n" + 
+			"  void setBar(String bar){}\n" + 
+			"}\n" +
+			"public class Test {\n" +
+			"	void test() {\n" +
+			"		new Foo<Bar>().apply(bar -> bar::setBar);\n" + 
+			"	}\n" +
+			"}\n"
+		});
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
index 2a3d883..4453690 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -14079,4 +14079,39 @@
 		},
 		"CCC");
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=438812, Missing bridge methods in indirect child classes with ECJ 3.10.0
+public void testBug438812() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"A.java",
+			"import java.util.Collection;\n" + 
+			"import java.util.List;\n" + 
+			"\n" + 
+			"public interface A {\n" + 
+			"    Iterable getIterable();\n" + 
+			"}\n" + 
+			"\n" + 
+			"class B implements A {\n" + 
+			"    public Collection getIterable() { return null; }\n" + 
+			"}\n" + 
+			"\n" + 
+			"class C extends B {\n" + 
+			"    public List getIterable() { return null; }\n" + 
+			"}",
+		},
+		"");
+	String expectedOutput = "  public bridge synthetic java.lang.Iterable getIterable();";
+
+	File f = new File(OUTPUT_DIR + File.separator + "C.class");
+	byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
+	ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+	String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED);
+	int index = result.indexOf(expectedOutput);
+	if (index == -1 || expectedOutput.length() == 0) {
+		System.out.println(Util.displayString(result, 3));
+	}
+	if (index == -1) {
+		assertEquals("Wrong contents", expectedOutput, result);
+	}
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
index 466c73a..a4d6926 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
@@ -3209,12 +3209,17 @@
 			},
 			getCompilerOptions(),
 			"----------\n" + 
-			"1. ERROR in X.java (at line 10)\n" + 
-			"	xs.foo(null);\n" + 
-			"	^^^^^^^^^^^^\n" + 
-			"Contradictory null annotations: method was inferred as \'@Nullable String foo(@NonNull @Nullable String)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" + 
+			"1. WARNING in X.java (at line 9)\n" + 
+			"	X<@Nullable String> xs = new X<String>();\n" + 
+			"	                         ^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
 			"----------\n" + 
-			"2. WARNING in X.java (at line 14)\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	xs.foo(null);\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 14)\n" + 
 			"	X<@Nullable String> xs = x;\n" + 
 			"	                         ^\n" + 
 			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
@@ -3250,18 +3255,62 @@
 			},
 			getCompilerOptions(),
 			"----------\n" + 
-			"1. ERROR in X.java (at line 12)\n" + 
-			"	xs.foo(null);\n" + 
-			"	^^^^^^^^^^^^\n" + 
-			"Contradictory null annotations: method was inferred as \'@Nullable String foo(@NonNull @Nullable String)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" + 
+			"1. WARNING in X.java (at line 10)\n" + 
+			"	X<@Nullable String> xs = new X<String>();\n" + 
+			"	                         ^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
 			"----------\n" + 
-			"2. WARNING in X.java (at line 16)\n" + 
+			"2. ERROR in X.java (at line 12)\n" + 
+			"	xs.foo(null);\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 16)\n" + 
 			"	X<@Nullable String> xs = x;\n" + 
 			"	                         ^\n" + 
 			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
 			"----------\n");
 	}
 	
+	// avoid extra warning by use of diamond.
+	public void testBug416182b() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import org.eclipse.jdt.annotation.Nullable;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	T foo(@NonNull T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		X<@Nullable String> xs = new X<>();\n" + 
+				"		xs.foo(null);\n" + 
+				"	}\n" + 
+				"	\n" +
+				"	public void test(X<String> x) {\n" + 
+				"		X<@Nullable String> xs = x;\n" + 
+				"		xs.bar(null);\n" + 
+				"	}\n" + 
+				"	public void bar(T t) {}\n" + 
+				"\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	xs.foo(null);\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 14)\n" + 
+			"	X<@Nullable String> xs = x;\n" + 
+			"	                         ^\n" + 
+			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
+			"----------\n");
+	}
+
 	public void testBug416183() {
 		runConformTestWithLibs(
 			new String[] {
@@ -5292,6 +5341,217 @@
 		getCompilerOptions(),
 		"");
 }
+// Bug 438179 - [1.8][null] 'Contradictory null annotations' error on type variable with explicit null-annotation.
+public void testTypeVariable12() {
+	runConformTestWithLibs(
+		new String[] {
+			"Test.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"@NonNullByDefault\n" + 
+			"public class Test {\n" + 
+			"	private Fu<String> fu = new Fu<>();\n" + 
+			"	public void foo() {\n" + 
+			"		fu.method();   // 'Contradictory null annotations' error\n" + 
+			"	}\n" + 
+			"}\n" + 
+			"class Fu<T> {\n" + 
+			"	@Nullable T method() {\n" + 
+			"		return null;\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"");
+}
+// NPE reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=438458#c5
+public void testTypeVariable18() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"Test.java",
+			"import java.util.*;\n" + 
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"interface Lib1 {\n" + 
+			"    <T extends Collection<?>> T constrainedTypeParameter(@NonNull T in);\n" + 
+			"}\n" + 
+			"\n" + 
+			"public class Test {\n" + 
+			"  @NonNull Collection<?> test4(Lib1 lib, @Nullable Collection<String> in) {\n" + 
+			"    return lib.constrainedTypeParameter(in);\n" + 
+			"  }\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"----------\n" + 
+		"1. WARNING in Test.java (at line 10)\n" + 
+		"	return lib.constrainedTypeParameter(in);\n" + 
+		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Null type safety (type annotations): The expression of type \'Collection<String>\' needs unchecked conversion to conform to \'@NonNull Collection<?>\'\n" + 
+		"----------\n" + 
+		"2. ERROR in Test.java (at line 10)\n" + 
+		"	return lib.constrainedTypeParameter(in);\n" + 
+		"	                                    ^^\n" + 
+		"Null type mismatch (type annotations): required \'@NonNull Collection<String>\' but this expression has type \'@Nullable Collection<String>\'\n" + 
+		"----------\n");
+}
+public void testTypeVariable18raw() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"Test.java",
+			"import java.util.*;\n" + 
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"interface Lib1 {\n" + 
+			"    <T extends Collection<?>> T constrainedTypeParameter(@NonNull T in);\n" + 
+			"}\n" + 
+			"\n" + 
+			"public class Test {\n" +
+			"  @SuppressWarnings(\"rawtypes\")\n" + 
+			"  @NonNull Collection test4(Lib1 lib, @Nullable Collection in) {\n" + 
+			"    return lib.constrainedTypeParameter(in);\n" + 
+			"  }\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"----------\n" + 
+		"1. WARNING in Test.java (at line 11)\n" + 
+		"	return lib.constrainedTypeParameter(in);\n" + 
+		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Null type safety (type annotations): The expression of type \'Collection\' needs unchecked conversion to conform to \'@NonNull Collection\'\n" + 
+		"----------\n" + 
+		"2. ERROR in Test.java (at line 11)\n" + 
+		"	return lib.constrainedTypeParameter(in);\n" + 
+		"	                                    ^^\n" + 
+		"Null type mismatch (type annotations): required \'@NonNull Collection\' but this expression has type \'@Nullable Collection\'\n" + 
+		"----------\n");
+}
+// top-level annotation is overridden at use-site, details remain - parameterized type
+public void testTypeVariable19() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"X.java",
+			"import java.util.ArrayList;\n" + 
+			"import java.util.List;\n" + 
+			"\n" + 
+			"import org.eclipse.jdt.annotation.NonNull;\n" + 
+			"import org.eclipse.jdt.annotation.Nullable;\n" +
+			"interface I<T,U extends List<T>> {\n" +
+			"	U get0();\n" +
+			"	@Nullable U get1();\n" + 
+			"	@NonNull U get2();\n" + 
+			"}\n" + 
+			"class X {\n" + 
+			"	static String test (I<@Nullable String, @NonNull ArrayList<@Nullable String>> i1,\n" +
+			"						I<@NonNull String, @Nullable ArrayList<@NonNull String>> i2, int s) {\n" +
+			"		switch(s) {\n" +
+			"			case 0 : return i1.get0().get(0).toUpperCase(); // problem at detail\n" + 
+			"			case 1 : return i1.get1().get(0).toUpperCase(); // 2 problems\n" + 
+			"			case 2 : return i1.get2().get(0).toUpperCase(); // problem at detail\n" + 
+			"			case 3 : return i2.get0().get(0).toUpperCase(); // problem at top\n" + 
+			"			case 4 : return i2.get1().get(0).toUpperCase(); // problem at top\n" + 
+			"			case 5 : return i2.get2().get(0).toUpperCase(); // OK\n" +
+			"			default : return \"\";" +
+			"		}\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"----------\n" + 
+		"1. ERROR in X.java (at line 15)\n" + 
+		"	case 0 : return i1.get0().get(0).toUpperCase(); // problem at detail\n" + 
+		"	                ^^^^^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get(int) may return null\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 16)\n" + 
+		"	case 1 : return i1.get1().get(0).toUpperCase(); // 2 problems\n" + 
+		"	                ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get1() may return null\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 16)\n" + 
+		"	case 1 : return i1.get1().get(0).toUpperCase(); // 2 problems\n" + 
+		"	                ^^^^^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get(int) may return null\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 17)\n" + 
+		"	case 2 : return i1.get2().get(0).toUpperCase(); // problem at detail\n" + 
+		"	                ^^^^^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get(int) may return null\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 18)\n" + 
+		"	case 3 : return i2.get0().get(0).toUpperCase(); // problem at top\n" + 
+		"	                ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get0() may return null\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 19)\n" + 
+		"	case 4 : return i2.get1().get(0).toUpperCase(); // problem at top\n" + 
+		"	                ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get1() may return null\n" + 
+		"----------\n");
+}
+// top-level annotation is overridden at use-site, array with anotations on dimensions
+public void testTypeVariable19a() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"X.java",
+			"import org.eclipse.jdt.annotation.NonNull;\n" + 
+			"import org.eclipse.jdt.annotation.Nullable;\n" +
+			"interface I1<T> {\n" + 
+			"	T @Nullable[] get0();\n" + 
+			"	@Nullable T @NonNull[] get1();\n" + 
+			"	@Nullable T @Nullable[] get2();\n" + 
+			"}\n" + 
+			"interface I2<T> {\n" + 
+			"	T @NonNull[] get0();\n" + 
+			"	@NonNull T @NonNull[] get1();\n" + 
+			"	@NonNull T @Nullable[] get2();\n" + 
+			"}\n" + 
+			"class X {\n" + 
+			"	static String test (I1<@NonNull String> i1, I2<@Nullable String> i2, int s) {\n" +
+			"		switch (s) {\n" + 
+			"			case 0: return i1.get0()[0].toUpperCase(); // problem on array\n" + 
+			"			case 1: return i1.get1()[0].toUpperCase(); // problem on element\n" + 
+			"			case 2: return i1.get2()[0].toUpperCase(); // 2 problems\n" +
+			"			case 3: return i2.get0()[0].toUpperCase(); // problem on element\n" + 
+			"			case 4: return i2.get1()[0].toUpperCase(); // OK\n" + 
+			"			case 5: return i2.get2()[0].toUpperCase(); // problem on array\n" +
+			"			default: return \"\";\n" +
+			"		}\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"----------\n" + 
+		"1. ERROR in X.java (at line 16)\n" + 
+		"	case 0: return i1.get0()[0].toUpperCase(); // problem on array\n" + 
+		"	               ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get0() may return null\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 17)\n" + 
+		"	case 1: return i1.get1()[0].toUpperCase(); // problem on element\n" + 
+		"	               ^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: array element may be null\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 18)\n" + 
+		"	case 2: return i1.get2()[0].toUpperCase(); // 2 problems\n" + 
+		"	               ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get2() may return null\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 18)\n" + 
+		"	case 2: return i1.get2()[0].toUpperCase(); // 2 problems\n" + 
+		"	               ^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: array element may be null\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 19)\n" + 
+		"	case 3: return i2.get0()[0].toUpperCase(); // problem on element\n" + 
+		"	               ^^^^^^^^^^^^\n" + 
+		"Potential null pointer access: array element may be null\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 21)\n" + 
+		"	case 5: return i2.get2()[0].toUpperCase(); // problem on array\n" + 
+		"	               ^^^^^^^^^\n" + 
+		"Potential null pointer access: The method get2() may return null\n" + 
+		"----------\n");
+}
 public void testBug434600() {
 	runConformTestWithLibs(
 		new String[] {
@@ -5507,4 +5767,123 @@
 		getCompilerOptions(),
 		"");
 }
+public void testBug440462() {
+	runConformTestWithLibs(
+		new String[]{
+			"CompilerError.java",
+			"import org.eclipse.jdt.annotation.NonNullByDefault;\n" + 
+			"import org.eclipse.jdt.annotation.Nullable;\n" + 
+			"import java.util.*;\n" + 
+			"@NonNullByDefault\n" + 
+			"public class CompilerError {\n" + 
+			"\n" + 
+			"    List<@Nullable ? extends Integer> list = new ArrayList<@Nullable Integer>();\n" + // FIXME: should be able to use diamond!
+			"\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"");
+}
+public void testBug439298_comment2() {
+	runConformTestWithLibs(
+		new String[] {
+			"Extract.java",
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"class R<T> {\n" + 
+			"	R(@Nullable T t) {}\n" + 
+			"}\n" + 
+			"class A {}\n" + 
+			"@NonNullByDefault\n" + 
+			"public class Extract {\n" + 
+			"	R<A> test() {\n" + 
+			"		return new R<A>(null);\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"");
+}
+public void testBug439298_comment3() {
+	runConformTestWithLibs(
+		new String[] {
+			"Extract.java",
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"class R<T> {\n" + 
+			"	R(@Nullable T t) {}\n" + 
+			"}\n" + 
+			"class A {}\n" + 
+			"public class Extract {\n" + 
+			"	R<A> test() {\n" + 
+			"		return new R<@NonNull A>(null);\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"");
+}
+public void testBug439298_comment4() {
+	runConformTestWithLibs(
+		new String[] {
+			"Extract.java",
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"class R<T> {\n" + 
+			"    R(@Nullable T t) {}\n" + 
+			"}\n" + 
+			"class A {}\n" + 
+			"public class Extract {\n" + 
+			"    R<@NonNull A> test() {\n" + 
+			"        return new R<>(null);\n" + 
+			"    }\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"");
+}
+// this code raised: java.lang.IllegalArgumentException: Type doesn't have its own method?
+// at org.eclipse.jdt.internal.compiler.lookup.SyntheticFactoryMethodBinding.applyTypeArgumentsOnConstructor(SyntheticFactoryMethodBinding.java:40)
+public void testBug440764() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"Extract.java",
+			"import java.util.Comparator;\n" + 
+			"\n" + 
+			"import org.eclipse.jdt.annotation.*;\n" + 
+			"\n" + 
+			"@NonNullByDefault({ DefaultLocation.TYPE_PARAMETER })\n" + 
+			"public class Extract<T> implements Comparator<@NonNull T>  {\n" + // FIXME: annot on 'T' shouldn't be needed
+			"	public Extract(Comparator<T> wrapped) {\n" + 
+			"	}\n" + 
+			"\n" + 
+			"	@Override\n" + 
+			"	public int compare(T o1, T o2) {\n" + 
+			"		return 0;\n" + 
+			"	}\n" + 
+			"	\n" + 
+			"	void test(final Comparator<@Nullable Integer> c) {\n" + 
+			"		new Extract<>(c).compare(1, null);\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		// Note: these exact errors are not intended, in 4.5 we report better errors via Bug 434602
+		"----------\n" + 
+		"1. ERROR in Extract.java (at line 16)\n" + 
+		"	new Extract<>(c).compare(1, null);\n" + 
+		"	^^^^^^^^^^^^^^^^\n" + 
+		"Contradictory null annotations: method was inferred as \'Extract<@NonNull @Nullable Integer> <factory>(Comparator<@NonNull @Nullable Integer>)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" + 
+		"----------\n" + 
+		"2. ERROR in Extract.java (at line 16)\n" + 
+		"	new Extract<>(c).compare(1, null);\n" + 
+		"	^^^^^^^^^^^^^^^^\n" + 
+		"Contradictory null annotations: method was inferred as \'void <init>(Comparator<@NonNull @Nullable Integer>)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" + 
+		"----------\n" + 
+		"3. ERROR in Extract.java (at line 16)\n" + 
+		"	new Extract<>(c).compare(1, null);\n" + 
+		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Contradictory null annotations: method was inferred as \'int compare(@NonNull @Nullable Integer, @NonNull @Nullable Integer)\', but only one of \'@NonNull\' and \'@Nullable\' can be effective at any location\n" + 
+		"----------\n");
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 999aee2..45f1454 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -22,6 +22,8 @@
  *                          Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator
  *                          Bug 415470 - [1.8][compiler] Type annotations on class declaration go vanishing
  *                          Bug 405104 - [1.8][compiler][codegen] Implement support for serializeable lambdas
+ *     Stephan Herrmann - Contribution for
+ *							Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler;
 
@@ -5296,11 +5298,11 @@
 			this.innerClassesBindings = new HashSet(INNER_CLASSES_SIZE);
 		}
 		ReferenceBinding innerClass = (ReferenceBinding) binding;
-		this.innerClassesBindings.add(innerClass.erasure().unannotated());  // should not emit yet another inner class for Outer.@Inner Inner.
+		this.innerClassesBindings.add(innerClass.erasure().unannotated(false));  // should not emit yet another inner class for Outer.@Inner Inner.
 		ReferenceBinding enclosingType = innerClass.enclosingType();
 		while (enclosingType != null
 				&& enclosingType.isNestedType()) {
-			this.innerClassesBindings.add(enclosingType.erasure().unannotated());
+			this.innerClassesBindings.add(enclosingType.erasure().unannotated(false));
 			enclosingType = enclosingType.enclosingType();
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
index ec4e015..ec8b0e5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
@@ -31,6 +31,7 @@
  *							Bug 428980 - [1.8][null] simple expression as lambda body doesn't leverage null annotation on argument
  *							Bug 429430 - [1.8] Lambdas and method reference infer wrong exception type with generics (RuntimeException instead of IOException)
  *							Bug 432110 - [1.8][compiler] nested lambda type incorrectly inferred vs javac
+ *							Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
  *                          Bug 405104 - [1.8][compiler][codegen] Implement support for serializeable lambdas
  *******************************************************************************/
@@ -507,7 +508,7 @@
 			int length = this.binding.parameters.length;
 			for (int i=0; i<length; i++) {
 				if (!this.scope.validateNullAnnotation(this.binding.returnType.tagBits, this.arguments[i].type, this.arguments[i].annotations))
-					this.binding.returnType = this.binding.returnType.unannotated();
+					this.binding.returnType = this.binding.returnType.unannotated(true);
 			}
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index 51a6378..a8faee5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -26,6 +26,7 @@
  *							Bug 428264 - [1.8] method reference of generic class causes problems (wrong inference result or NPE)
  *							Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
  *							Bug 426537 - [1.8][inference] Eclipse compiler thinks I<? super J> is compatible with I<J<?>> - raw type J involved
+ *							Bug 435689 - [1.8][inference] Type inference not occurring with lambda expression and method reference
  *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contribution for
  *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
@@ -385,9 +386,10 @@
 				return this.resolvedType = null;
     	}
 
+    	if (lhsType != null && !lhsType.isRawType()) // RawType::m and RawType::new are not exact method references
+    		this.exactMethodBinding = isMethodReference() ? scope.getExactMethod(lhsType, this.selector, this) : scope.getExactConstructor(lhsType, this);
+
     	if (this.expectedType == null && this.expressionContext == INVOCATION_CONTEXT) {
-    		if (lhsType != null && !lhsType.isRawType()) // RawType::m and RawType::new are not exact method references
-    			this.exactMethodBinding = isMethodReference() ? scope.getExactMethod(lhsType, this.selector, this) : scope.getExactConstructor(lhsType, this);
     		return new PolyTypeBinding(this);
 		}
 		super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
index 7f908cc..adb00ab 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
@@ -13,6 +13,7 @@
  *							Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
  *							Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *							Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
+ *							Bug 440462 - [null][compiler]NPE in EJC for erroneous null annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -75,7 +76,13 @@
 		if (boundType != null && boundType.hasNullTypeAnnotations() && this.resolvedType.hasNullTypeAnnotations()) {
 			if (((boundType.tagBits | this.resolvedType.tagBits) & TagBits.AnnotationNullMASK) == TagBits.AnnotationNullMASK) { // are both set?
 				Annotation annotation = this.bound.findAnnotation(boundType.tagBits & TagBits.AnnotationNullMASK);
-				scope.problemReporter().contradictoryNullAnnotationsOnBounds(annotation, this.resolvedType.tagBits);
+				if (annotation == null) { // false alarm, implicit annotation is no conflict, but should be removed:
+					TypeBinding newBound = boundType.unannotated(true);
+					((WildcardBinding)this.resolvedType).bound = newBound;
+					this.bound.resolvedType = newBound;
+				} else {
+					scope.problemReporter().contradictoryNullAnnotationsOnBounds(annotation, this.resolvedType.tagBits);
+				}
 			}
 		}
 		return this.resolvedType;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
index e2cd332..82d9140 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
@@ -21,6 +21,7 @@
  *								Bug 425460 - [1.8] [inference] Type not inferred on stream.toArray
  *								Bug 426792 - [1.8][inference][impl] generify new type inference engine
  *								Bug 428019 - [1.8][compiler] Type inference failure with nested generic invocation.
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -476,8 +477,17 @@
 public String toString() {
 	return this.leafComponentType != null ? debugName() : "NULL TYPE ARRAY"; //$NON-NLS-1$
 }
-public TypeBinding unannotated() {
-	return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+	if (!hasTypeAnnotations())
+		return this;
+	if (removeOnlyNullAnnotations) {
+		if (!hasNullTypeAnnotations())
+			return this;
+		AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+		if (newAnnotations.length > 0)
+			return this.environment.createArrayType(this.leafComponentType.unannotated(false), this.dimensions, newAnnotations);
+	}
+	return this.environment.getUnannotatedType(this);
 }
 @Override
 public TypeBinding uncapture(Scope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
index 6e0bd31..aad394b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *     Stephan Herrmann - Contribution for
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
  *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -172,7 +173,7 @@
 		super.setTypeAnnotations(annotations, false); // never set nullTagBits on base types
 	}
 
-	public TypeBinding unannotated() {
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
 		if (!this.hasTypeAnnotations())
 			return this;
 		switch (this.id) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index 1fcc839..b9a551f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -28,6 +28,7 @@
  *								Bug 392245 - [1.8][compiler][null] Define whether / how @NonNullByDefault applies to TYPE_USE locations
  *								Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
  *								Bug 390889 - [1.8][compiler] Evaluate options to support 1.7- projects against 1.8 JRE.
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *    Jesper Steen Moller - Contributions for
  *								Bug 412150 [1.8] [compiler] Enable reflected parameter names during annotation processing
  *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
@@ -2370,7 +2371,14 @@
 	return buffer.toString();
 }
 
-public TypeBinding unannotated() {
+public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+	if (removeOnlyNullAnnotations) {
+		if (!hasNullTypeAnnotations())
+			return this;
+		AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+		if (newAnnotations.length > 0)
+			return this.environment.createAnnotatedType(this.prototype, newAnnotations);
+	}
 	return this.prototype;
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
index 24f9b2a..151ab19 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
@@ -236,13 +236,13 @@
 			if (nullHints == TagBits.AnnotationNullMASK) {
 				// on contradiction remove null type annotations
 				for (int i = 0; i < boundTypes.length; i++)
-					boundTypes[i] = boundTypes[i].unannotated();
+					boundTypes[i] = boundTypes[i].unannotated(true);
 			} else {
 				AnnotationBinding[] annot = environment.nullAnnotationsFromTagBits(nullHints);
 				if (annot != null) {
 					// only get here if exactly one of @NonNull or @Nullable was hinted; now apply this hint:
 					for (int i = 0; i < boundTypes.length; i++)
-						boundTypes[i] = environment.createAnnotatedType(boundTypes[i], annot);
+						boundTypes[i] = environment.createAnnotatedType(boundTypes[i].unannotated(true), annot);
 				}
 			}
 		}
@@ -266,11 +266,11 @@
 					nullHints |= it.next().nullHints;
 			}
 			if (nullHints == TagBits.AnnotationNullMASK) // on contradiction remove null type annotations
-				return type.unannotated();
+				return type.unannotated(true);
 			AnnotationBinding[] annot = environment.nullAnnotationsFromTagBits(nullHints);
 			if (annot != null)
 				// only get here if exactly one of @NonNull or @Nullable was hinted; now apply this hint:
-				return environment.createAnnotatedType(type, annot);
+				return environment.createAnnotatedType(type.unannotated(true), annot);
 			return type;
 		}
 		public void setInstantiation(TypeBinding type, InferenceVariable variable, LookupEnvironment environment) {
@@ -286,7 +286,7 @@
 					// adjust 'type' to fit the newBits
 					AnnotationBinding[] annot = environment.nullAnnotationsFromTagBits(newBits);
 					if (annot != null)
-						type = environment.createAnnotatedType(type.unannotated(), annot);
+						type = environment.createAnnotatedType(type.unannotated(true), annot);
 				}
 			}
 			this.instantiation = type;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
index 7b40ba4..f8f3f81 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
@@ -435,7 +435,8 @@
 				if (sam.returnType != TypeBinding.VOID) {
 					// ii)
 					final TypeBinding r = sam.returnType;
-					Statement body = lambda.body();
+					LambdaExpression resolved = lambda.getResolvedCopyForInferenceTargeting(this.right);
+					Statement body = resolved != null ? resolved.body() : lambda.body();
 					if (body instanceof Expression) {
 						variables.addAll(new ConstraintExpressionFormula((Expression) body, r, COMPATIBLE).inputVariables(context));
 					} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
index a0df8bc..596934b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
@@ -292,7 +292,8 @@
 			}
 		}
 		if (checkVararg && varArgsType instanceof ArrayBinding) {
-			TypeBinding thetaF = substitute(((ArrayBinding) varArgsType).elementsType());
+			varArgsType = ((ArrayBinding)varArgsType).elementsType();
+			TypeBinding thetaF = substitute(varArgsType);
 			for (int i = len; i < this.invocationArguments.length; i++) {
 				if (this.invocationArguments[i].isPertinentToApplicability(varArgsType, method)) {
 					this.initialConstraints[numConstraints++] = new ConstraintExpressionFormula(this.invocationArguments[i], thetaF, ReductionResult.COMPATIBLE, ARGUMENT_CONSTRAINTS_ARE_SOFT);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index 903c634..8a67d95 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -26,6 +26,7 @@
  *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *								Bug 416190 - [1.8][null] detect incompatible overrides due to null type annotations
  *								Bug 424624 - [1.8][null] if a static-object with annotation @NonNull is used, a warning is shown
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -1943,4 +1944,27 @@
 public TypeBinding[] getAnnotatedTypes(TypeBinding type) {
 	return this.typeSystem.getAnnotatedTypes(type);
 }
+
+public AnnotationBinding[] filterNullTypeAnnotations(AnnotationBinding[] typeAnnotations) {
+	if (typeAnnotations.length == 0)
+		return typeAnnotations;
+	AnnotationBinding[] filtered = new AnnotationBinding[typeAnnotations.length];
+	int count = 0;
+	for (int i = 0; i < typeAnnotations.length; i++) {
+		AnnotationBinding typeAnnotation = typeAnnotations[i];
+		if (typeAnnotation == null) {
+			count++; // sentinel in annotation sequence for array dimensions
+		} else {
+			int id = typeAnnotation.type.id;
+			if (id != TypeIds.T_ConfiguredAnnotationNonNull && id != TypeIds.T_ConfiguredAnnotationNullable)
+				filtered[count++] = typeAnnotation;
+		}
+	}
+	if (count == 0)
+		return Binding.NO_ANNOTATIONS;
+	if (count == typeAnnotations.length)
+		return typeAnnotations;
+	System.arraycopy(filtered, 0, filtered = new AnnotationBinding[count], 0, count);
+	return filtered;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
index 8ba4822..6e8c91d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
@@ -1037,11 +1037,15 @@
 		return false; // must hold onto ParameterizedMethod to see if a bridge method is necessary
 
 	inheritedMethod = computeSubstituteMethod(inheritedMethod, existingMethod);
-	return inheritedMethod != null
-		&& (TypeBinding.equalsEquals(inheritedMethod.returnType, existingMethod.returnType)	// need to keep around to produce bridge methods? ...
-			|| (TypeBinding.notEquals(this.type, existingMethod.declaringClass) 			// ... not if inheriting the bridge situation from a superclass
-					&& !existingMethod.declaringClass.isInterface()))
-		&& doesMethodOverride(existingMethod, inheritedMethod);
+	if (inheritedMethod == null
+			|| TypeBinding.notEquals(inheritedMethod.returnType, existingMethod.returnType)) // need to keep around to produce bridge methods? ...
+		return false;
+
+	if (!doesMethodOverride(existingMethod, inheritedMethod))
+		return false;
+
+	return TypeBinding.notEquals(this.type, existingMethod.declaringClass) // ... not if inheriting the bridge situation from a superclass
+			&& !existingMethod.declaringClass.isInterface();
 }
 public boolean isMethodSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
 	if (!org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, inheritedMethod.selector))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
index 5880f46..49eb52c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -25,7 +27,7 @@
 		return; // reject misguided attempt.
 	}
 	
-	public TypeBinding unannotated() {
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
 		return this;
 	}
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
index ae8db16..df93e33 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
@@ -34,6 +34,8 @@
  *								Bug 428294 - [1.8][compiler] Type mismatch: cannot convert from List<Object> to Collection<Object[]>
  *								Bug 427199 - [1.8][resource] avoid resource leak warnings on Streams that have no resource
  *								Bug 416182 - [1.8][compiler][null] Contradictory null annotations not rejected
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
+ *								Bug 438179 - [1.8][null] 'Contradictory null annotations' error on type variable with explicit null-annotation.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -966,8 +968,17 @@
 		return isRawType();
 	}
 
-	public TypeBinding unannotated() {
-		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+		if (!hasTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations && !hasNullTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations) {
+			ReferenceBinding unannotatedGenericType = (ReferenceBinding) this.environment.getUnannotatedType(this.type);
+			AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+			return this.environment.createParameterizedType(unannotatedGenericType, this.arguments, this.enclosingType, newAnnotations);
+		}
+		return this.environment.getUnannotatedType(this);
 	}
 
 	public int kind() {
@@ -1360,7 +1371,7 @@
 					    	return originalVariable;
 					 }
 			    	 TypeBinding substitute = currentType.arguments[originalVariable.rank];
-			    	 return originalVariable.hasTypeAnnotations() ? this.environment.createAnnotatedType(substitute, originalVariable.getTypeAnnotations()) : substitute;
+			    	 return originalVariable.combineTypeAnnotations(substitute);
 			    }	
 			}
 			// recurse on enclosing type, as it may hold more substitutions to perform
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
index ccc979a..191ca3f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
@@ -13,6 +13,7 @@
  *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *								Bug 423504 - [1.8] Implement "18.5.3 Functional Interface Parameterization Inference"
  *								Bug 425783 - An internal error occurred during: "Requesting Java AST from selection". java.lang.StackOverflowError
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -79,6 +80,19 @@
 		return new RawTypeBinding(this.actualType(), (ReferenceBinding) outerType, this.environment);
 	}
 
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+		if (!hasTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations && !hasNullTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations) {
+			ReferenceBinding unannotatedGenericType = (ReferenceBinding) this.environment.getUnannotatedType(this.genericType());
+			AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+			return this.environment.createRawType(unannotatedGenericType, this.enclosingType(), newAnnotations);
+		}
+		return this.environment.getUnannotatedType(this);
+	}
+
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding#createParameterizedMethod(org.eclipse.jdt.internal.compiler.lookup.MethodBinding)
 	 */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index 2133ad4..74fd1b1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -34,6 +34,7 @@
  *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
  *								Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
  *								Bug 432348 - [1.8] Internal compiler error (NPE) after upgrade to 1.8
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
  *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *     Till Brychcy - Contributions for
@@ -3532,7 +3533,14 @@
 // SH}
 }
 
-public TypeBinding unannotated() {
+public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+	if (removeOnlyNullAnnotations) {
+		if (!hasNullTypeAnnotations())
+			return this;
+		AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+		if (newAnnotations.length > 0)
+			return this.environment.createAnnotatedType(this.prototype, newAnnotations);
+	}
 	return this.prototype;
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
index 349c0a3..93849cd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
@@ -36,6 +36,11 @@
 		for (MethodBinding parameterizedMethod : parameterizedType.methods()) {
 			if (parameterizedMethod.original() == this.staticFactoryFor)
 				return (ParameterizedMethodBinding) parameterizedMethod;
+			if (parameterizedMethod instanceof ProblemMethodBinding) {
+				MethodBinding closestMatch = ((ProblemMethodBinding)parameterizedMethod).closestMatch;
+				if (closestMatch instanceof ParameterizedMethodBinding && closestMatch.original() == this.staticFactoryFor)
+					return (ParameterizedMethodBinding) closestMatch;
+			}
 		}
 		throw new IllegalArgumentException("Type doesn't have its own method?"); //$NON-NLS-1$
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
index 142a156..2aae283 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
@@ -26,6 +26,7 @@
  *								Bug 427626 - [1.8] StackOverflow while typing new ArrayList<String>().toArray( and asking for code completion
  *								Bug 428019 - [1.8][compiler] Type inference failure with nested generic invocation.
  *								Bug 435962 - [RC2] StackOverFlowError when building
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
  *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
  *******************************************************************************/
@@ -1461,16 +1462,17 @@
 		case Binding.PARAMETERIZED_TYPE :
 		case Binding.RAW_TYPE :
 		case Binding.ARRAY_TYPE :
-			return erasure().unannotated();
+			return erasure().unannotated(false);
 		default :
-			return this.unannotated();
+			return this.unannotated(false);
 	}
 }
 
 /** 
  * Return this type minus its type annotations
+ * @param removeOnlyNullAnnotations if true only null type annotations are removed, otherwise all type annotations.
  */
-public TypeBinding unannotated() {
+public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
 	return this;
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
index b853a8a..dd01871 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
@@ -24,6 +24,8 @@
  *								Bug 431269 - [1.8][compiler][null] StackOverflow in nullAnnotatedReadableName
  *								Bug 431408 - Java 8 (1.8) generics bug
  *								Bug 435962 - [RC2] StackOverFlowError when building
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
+ *								Bug 438179 - [1.8][null] 'Contradictory null annotations' error on type variable with explicit null-annotation.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -909,9 +911,19 @@
 	    return readableName;
 	}
 
-	// May still carry declaration site annotations.
-	public TypeBinding unannotated() {
-		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+		if (!hasTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations && !hasNullTypeAnnotations())
+			return this;
+		TypeBinding unannotated = this.environment.getUnannotatedType(this);
+		if (removeOnlyNullAnnotations) {
+			AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
+			if (newAnnotations.length > 0)
+				return this.environment.createAnnotatedType(unannotated, newAnnotations);
+			// FIXME: selectively keep type annotations on bounds
+		}
+		return unannotated; 
 	}
 	/**
 	 * Upper bound doesn't perform erasure
@@ -1019,4 +1031,34 @@
 		}
 		return superInterfaces;
 	}
+
+	public TypeBinding combineTypeAnnotations(TypeBinding substitute) {
+		if (hasTypeAnnotations()) {
+			// may need to merge annotations from the original variable and from substitution:
+			if (hasRelevantTypeUseNullAnnotations()) {
+				// explicit type use null annotation overrides any annots on type parameter and concrete type arguments
+				substitute = substitute.unannotated(true);
+			}
+			if (this.typeAnnotations != Binding.NO_ANNOTATIONS)
+				return this.environment.createAnnotatedType(substitute, this.typeAnnotations);
+			// no annots on this variable => keep any annots on substitute (fall through):
+		}
+		return substitute;
+	}
+
+	private boolean hasRelevantTypeUseNullAnnotations() {
+		TypeVariableBinding[] parameters;
+		if (this.declaringElement instanceof ReferenceBinding) {
+			parameters = ((ReferenceBinding)this.declaringElement).original().typeVariables();
+		} else if (this.declaringElement instanceof MethodBinding) {
+			parameters = ((MethodBinding)this.declaringElement).original().typeVariables;
+		} else {
+			throw new IllegalStateException("Unexpected declaring element:"+String.valueOf(this.declaringElement.readableName())); //$NON-NLS-1$
+		}
+		TypeVariableBinding parameter = parameters[this.rank];
+		// recognize explicit annots by their effect on null tag bits, if there's no effect, then the annot is not considered relevant
+		long currentNullBits = this.tagBits & TagBits.AnnotationNullMASK;
+		long declarationNullBits = parameter.tagBits & TagBits.AnnotationNullMASK;
+		return (currentNullBits & ~declarationNullBits) != 0;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
index 5fdbc1a..3ad8be4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -25,7 +27,7 @@
 		return; // reject misguided attempt.
 	}
 	
-	public TypeBinding unannotated() {
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
 		return this;
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
index 2a40a44..ed14129 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
@@ -19,6 +19,7 @@
  *								Bug 427411 - [1.8][generics] JDT reports type mismatch when using method that returns generic type
  *								Bug 428019 - [1.8][compiler] Type inference failure with nested generic invocation.
  *								Bug 435962 - [RC2] StackOverFlowError when building
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -933,8 +934,24 @@
 		return this.typeVariable;
 	}
 
-	public TypeBinding unannotated() {
-		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	public TypeBinding unannotated(boolean removeOnlyNullAnnotations) {
+		if (!hasTypeAnnotations())
+			return this;
+		if (removeOnlyNullAnnotations && !hasNullTypeAnnotations())
+			return this;
+		ReferenceBinding unannotatedGenericType = (ReferenceBinding) this.genericType.unannotated(removeOnlyNullAnnotations);
+		if (removeOnlyNullAnnotations) {
+			// cf. structure of uncapture():
+			TypeBinding unannotatedBound = this.bound != null ? this.bound.unannotated(removeOnlyNullAnnotations) : null;
+			int length = 0;
+			TypeBinding [] unannotatedOtherBounds = this.otherBounds == null ? null : new TypeBinding[length = this.otherBounds.length];
+			for (int i = 0; i < length; i++) {
+				unannotatedOtherBounds[i] = this.otherBounds[i] == null ? null : this.otherBounds[i].unannotated(removeOnlyNullAnnotations);
+			}
+			AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(getTypeAnnotations());
+			return this.environment.createWildcard(unannotatedGenericType, this.rank, unannotatedBound, unannotatedOtherBounds, this.boundKind, newAnnotations);			
+		}
+		return unannotatedGenericType;
 	}
 	@Override
 	public TypeBinding uncapture(Scope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index a5f3983..9cc4e22 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -52,6 +52,7 @@
  *								Bug 390889 - [1.8][compiler] Evaluate options to support 1.7- projects against 1.8 JRE.
  *								Bug 430150 - [1.8][null] stricter checking against type variables
  *								Bug 434600 - Incorrect null analysis error reporting on type parameters
+ *								Bug 439298 - [null] "Missing code implementation in the compiler" when using @NonNullByDefault in package-info.java
  *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
  *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
  *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
@@ -4038,6 +4039,10 @@
 				statement.sourceStart,
 				statement.sourceEnd);
 			return;
+		case ProblemReasons.ContradictoryNullAnnotations:
+			problemConstructor = (ProblemMethodBinding) targetConstructor;
+			contradictoryNullAnnotationsInferred(problemConstructor.closestMatch, statement);
+			return;
 		case ProblemReasons.NoError : // 0
 		default :
 			needImplementation(statement); // want to fail to see why we were here...
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
index c1c23b4..17d5380 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
@@ -9,6 +9,8 @@
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 438458 - [1.8][null] clean up handling of null type annotations wrt type variables
  *******************************************************************************/
 
 package org.eclipse.jdt.core.dom;
@@ -532,7 +534,7 @@
 	public ITypeBinding getTypeDeclaration() {
 		if (this.binding instanceof ParameterizedTypeBinding)
 			return this.resolver.getTypeBinding(((ParameterizedTypeBinding)this.binding).genericType());
-		return this.resolver.getTypeBinding(this.binding.unannotated());
+		return this.resolver.getTypeBinding(this.binding.unannotated(false));
 	}
 	
 	/* (non-Javadoc)
@@ -1293,7 +1295,7 @@
 			return false;
 		}
 		org.eclipse.jdt.internal.compiler.lookup.TypeBinding otherBinding = ((TypeBinding) other).binding;
-		if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(otherBinding.unannotated(), this.binding.unannotated())) {
+		if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(otherBinding.unannotated(false), this.binding.unannotated(false))) {
 			return true;
 		}
 		// check return type
