### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java,v retrieving revision 1.181 diff -u -r1.181 ASTConverterTest2.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 28 Jun 2007 15:03:28 -0000 1.181 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 16 Aug 2007 13:35:02 -0000 @@ -5483,4 +5483,28 @@ workingCopy.discardWorkingCopy(); } } + + /* + * Ensures that no exception is thrown in case of a syntax error in method parameter declarations + * (regression test for bug 200080 Endless illegal arg exceptions from java editor's ASTProvider) + */ + public void test0609() throws CoreException { + ICompilationUnit workingCopy = null; + try { + workingCopy = getWorkingCopy( + "/Converter/src/X.java", + "public class X {\n" + + " void foo(a, b, ) {\n" + + " if\n" + + " }\n" + + "}" + ); + ASTNode cu = workingCopy.reconcile(AST.JLS3, true, true, null, null); + assertNotNull("Should get an AST", cu); + } finally { + if (workingCopy != null) + workingCopy.discardWorkingCopy(); + } + } + }