Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 195374
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java (+8 lines)
Lines 41-46 Link Here
41
			if (typeRef != null) {
41
			if (typeRef != null) {
42
				this.resolvedType = typeRef.getTypeBinding(scope);
42
				this.resolvedType = typeRef.getTypeBinding(scope);
43
				typeRef.resolvedType = this.resolvedType;
43
				typeRef.resolvedType = this.resolvedType;
44
				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195374
45
				// reproduce javadoc 1.3.1 / 1.4.2 behavior
46
				if (typeRef instanceof SingleTypeReference && 
47
						this.resolvedType.leafComponentType().enclosingType() != null &&
48
						scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_4) {
49
					scope.problemReporter().javadocInvalidMemberTypeQualification(this.sourceStart, this.sourceEnd, scope.getDeclarationModifiers());
50
					return null;
51
				}
44
				if (!this.resolvedType.isValidBinding()) {
52
				if (!this.resolvedType.isValidBinding()) {
45
					scope.problemReporter().javadocInvalidType(typeRef, this.resolvedType, scope.getDeclarationModifiers());
53
					scope.problemReporter().javadocInvalidType(typeRef, this.resolvedType, scope.getDeclarationModifiers());
46
					return null;
54
					return null;
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (+39 lines)
Lines 5773-5776 Link Here
5773
				"Javadoc: Missing tag for parameter anotherInt\n" + 
5773
				"Javadoc: Missing tag for parameter anotherInt\n" + 
5774
				"----------\n");
5774
				"----------\n");
5775
	}
5775
	}
5776
	
5777
	/**
5778
	 * @bug 195374: [javadoc] Missing Javadoc warning for required qualification for inner types at 1.4 level
5779
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=195374"
5780
	 */
5781
	public void testBug195374() {
5782
		String[] units = new String[] {
5783
			"X.java",
5784
			"public class X {\n" + 
5785
			"	public static class Param {\n" +
5786
		    "       /**\n" +
5787
		    "         * warning expected when compliance < 1.5 {@link X#setParams(Param[])}\n" +
5788
		    "         * no warning expected {@link X#setParams(X.Param[])}\n" +
5789
		    "         */\n" +
5790
		    "        public int getIndex() {\n" +
5791
		    "                    return 0;\n" +
5792
		    "        }\n" +
5793
		    "    }\n" + 
5794
		    "    public void setParams(Param[] params) {\n" +
5795
		    "	}\n" +
5796
			"}\n"
5797
		};
5798
		
5799
		String error14 = new String(
5800
			// warning - Tag @link: can't find setParams(Param[]) in X
5801
			"----------\n" + 
5802
			"1. ERROR in X.java (at line 4)\n" + 
5803
			"	* warning expected when compliance < 1.5 {@link X#setParams(Param[])}\n" + 
5804
			"	                                                            ^^^^^^^\n" + 
5805
			"Javadoc: Invalid member type qualification\n" + 
5806
			"----------\n");
5807
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
5808
		if (complianceLevel.equals(COMPLIANCE_1_3) || complianceLevel.equals(COMPLIANCE_1_4)) {
5809
			runNegativeTest(units,error14);
5810
		}
5811
		else {
5812
			runConformTest(units);
5813
		}
5814
	}
5776
}
5815
}

Return to bug 195374