View | Details | Raw Unified | Return to bug 81134 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-1 / +27 lines)
Lines 88-94 Link Here
88
			return new Suite(ASTConverter15Test.class);
88
			return new Suite(ASTConverter15Test.class);
89
		}
89
		}
90
		TestSuite suite = new Suite(ASTConverter15Test.class.getName());
90
		TestSuite suite = new Suite(ASTConverter15Test.class.getName());
91
		suite.addTest(new ASTConverter15Test("test0092"));
91
		suite.addTest(new ASTConverter15Test("test0093"));
92
		return suite;
92
		return suite;
93
	}
93
	}
94
		
94
		
Lines 2816-2819 Link Here
2816
				workingCopy.discardWorkingCopy();
2816
				workingCopy.discardWorkingCopy();
2817
		}
2817
		}
2818
	}
2818
	}
2819
2820
	/*
2821
	 * Ensures that resolving a generic method with a non existing parameter type doesn't throw a NPE when computing its binding key.
2822
	 * (regression test for 81134 [dom] [5.0] NPE when creating AST
2823
	 */
2824
	public void test0093() throws JavaModelException {
2825
		ICompilationUnit workingCopy = null;
2826
		try {
2827
			workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
2828
			ASTNode node = buildAST(
2829
				"public class X {\n" + 
2830
				"   /*start*/<T> void foo(NonExisting arg) {\n" + 
2831
				"   }/*end*/\n" + 
2832
				"}",
2833
				workingCopy);
2834
			IBinding binding = ((MethodDeclaration) node).resolveBinding();
2835
			assertEquals(
2836
				null,
2837
				binding);
2838
		} finally {
2839
			if (workingCopy != null)
2840
				workingCopy.discardWorkingCopy();
2841
		}
2842
	}
2843
2844
2819
}
2845
}

Return to bug 81134