View | Details | Raw Unified | Return to bug 233887
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java (-1 / +1 lines)
Lines 529-535 Link Here
529
				// If no referenced method (field initializer for example) then report a problem for each param tag
529
				// If no referenced method (field initializer for example) then report a problem for each param tag
530
				if (methodDeclaration == null) {
530
				if (methodDeclaration == null) {
531
					for (int i = 0; i < paramTypeParamLength; i++) {
531
					for (int i = 0; i < paramTypeParamLength; i++) {
532
						JavadocSingleNameReference param = this.paramReferences[i];
532
						JavadocSingleTypeReference param = this.paramTypeParameters[i];
533
						scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd);
533
						scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd);
534
					}
534
					}
535
					return;
535
					return;
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (+37 lines)
Lines 7247-7250 Link Here
7247
		reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS;
7247
		reportMissingJavadocDescription = CompilerOptions.ALL_STANDARD_TAGS;
7248
		runConformTest(units);
7248
		runConformTest(units);
7249
	}
7249
	}
7250
7251
	/**
7252
	 * @bug 233887: Build of Eclipse project stop by NullPointerException and will not continue on Eclipse version later than 3.4M7
7253
	 * @test Ensure that no NPE is raised when a 1.5 param tag syntax is incorrectly used on a fiel with an initializer
7254
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=233887"
7255
	 */
7256
	public void testBug233887() {
7257
		String expectedError = this.complianceLevel <= ClassFileConstants.JDK1_4 ?
7258
			"----------\n" + 
7259
			"1. ERROR in NPETest.java (at line 5)\n" + 
7260
			"	* @param <name> <description>\n" + 
7261
			"	         ^^^^^^\n" + 
7262
			"Javadoc: Invalid param tag name\n" + 
7263
			"----------\n"
7264
		:
7265
			"----------\n" + 
7266
			"1. ERROR in NPETest.java (at line 5)\n" + 
7267
			"	* @param <name> <description>\n" + 
7268
			"	   ^^^^^\n" + 
7269
			"Javadoc: Unexpected tag\n" + 
7270
			"----------\n";
7271
		runNegativeTest(
7272
			new String[] {
7273
				"NPETest.java",
7274
				"public class NPETest {\n" + 
7275
				"	public NPETest() {\n" + 
7276
				"	}\n" + 
7277
				"	/**\n" + 
7278
				"	 * @param <name> <description>\n" + 
7279
				"	 */\n" + 
7280
				"	private static final int MAX = 50;\n" + 
7281
				"\n" + 
7282
				"}\n"
7283
			},
7284
			expectedError
7285
		);
7286
	}
7250
}
7287
}

Return to bug 233887