### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v retrieving revision 1.57 diff -u -r1.57 Javadoc.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 10 Sep 2007 07:11:04 -0000 1.57 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 26 May 2008 11:11:41 -0000 @@ -529,7 +529,7 @@ // If no referenced method (field initializer for example) then report a problem for each param tag if (methodDeclaration == null) { for (int i = 0; i < paramTypeParamLength; i++) { - JavadocSingleNameReference param = this.paramReferences[i]; + JavadocSingleTypeReference param = this.paramTypeParameters[i]; scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd); } return; #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java,v retrieving revision 1.42 diff -u -r1.42 JavadocBugsTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 7 May 2008 17:55:04 -0000 1.42 +++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 26 May 2008 11:11:43 -0000 @@ -7247,4 +7247,41 @@ reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS; runConformTest(units); } + + /** + * @bug 233887: Build of Eclipse project stop by NullPointerException and will not continue on Eclipse version later than 3.4M7 + * @test Ensure that no NPE is raised when a 1.5 param tag syntax is incorrectly used on a fiel with an initializer + * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=233887" + */ + public void testBug233887() { + String expectedError = this.complianceLevel <= ClassFileConstants.JDK1_4 ? + "----------\n" + + "1. ERROR in NPETest.java (at line 5)\n" + + " * @param \n" + + " ^^^^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + : + "----------\n" + + "1. ERROR in NPETest.java (at line 5)\n" + + " * @param \n" + + " ^^^^^\n" + + "Javadoc: Unexpected tag\n" + + "----------\n"; + runNegativeTest( + new String[] { + "NPETest.java", + "public class NPETest {\n" + + " public NPETest() {\n" + + " }\n" + + " /**\n" + + " * @param \n" + + " */\n" + + " private static final int MAX = 50;\n" + + "\n" + + "}\n" + }, + expectedError + ); + } } \ No newline at end of file