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

(-)src/org/eclipse/jdt/core/tests/model/SelectionJavadocModelTests.java (+23 lines)
Lines 919-922 Link Here
919
			elements
919
			elements
920
		);
920
		);
921
	}
921
	}
922
923
	/**
924
	 * @bug 165701: [model] No hint for ambiguous javadoc
925
	 * @test Ensure that no exception is thrown while selecting method in javadoc comment
926
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=165701"
927
	 */
928
	public void testBug165701() throws JavaModelException {
929
		setUnit("b165701/Test.java",
930
			"package b165701;\n" + 
931
			"/**\n" + 
932
			" * @see #fooo(int)\n" + 
933
			" */\n" + 
934
			"public class Test {\n" + 
935
			"	public void foo() {}\n" + 
936
			"}\n"
937
		);
938
		int[] selectionPositions = selectionInfo(workingCopies[0], "fooo", 1);
939
		IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
940
		assertElementsEqual("Invalid selection(s)",
941
			"Test [in [Working copy] Test.java [in b165701 [in <project root> [in Tests]]]]",
942
			elements
943
		);
944
	}
922
}
945
}
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java (-1 / +1 lines)
Lines 325-331 Link Here
325
	int signatureLength = sig.length;
325
	int signatureLength = sig.length;
326
	
326
	
327
	// thrown exceptions
327
	// thrown exceptions
328
	int thrownExceptionsLength = this.thrownExceptions.length;
328
	int thrownExceptionsLength = this.thrownExceptions == null ? 0 : this.thrownExceptions.length;
329
	int thrownExceptionsSignatureLength = 0;
329
	int thrownExceptionsSignatureLength = 0;
330
	char[][] thrownExceptionsSignatures = null;
330
	char[][] thrownExceptionsSignatures = null;
331
	boolean addThrownExceptions = thrownExceptionsLength > 0 && (!isGeneric || CharOperation.lastIndexOf('^', sig) < 0);
331
	boolean addThrownExceptions = thrownExceptionsLength > 0 && (!isGeneric || CharOperation.lastIndexOf('^', sig) < 0);

Return to bug 165701