Bug 95785 [5.0] Content assist for Collection#toArray(T[]) does not show additional info
N20050518-0010 (also with HEAD of JDT/UI and JDT/Core) - have 'Fill argument names on completion' and 'Guess filled method arguments' enabled - in the method below (in a 5.0 project), execute contant assist after toArray and choose "toArray(Object[] a)": public void test(java.util.List aList){ aList.toArray } => There's not javadoc for this method => the line now reads: aList.toArray(toarray - convert collection to array) - changing the parameter type to List<Object> splits the proposal in two and emits a beep when the proposals are inserted: - toArray(T[]) T[] - Collection - toArray(T[]) T[] - List => Expected: only the one from List is proposed; no beep.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/MethodProposalInfo.java
*         parameter types and constructor state.
	 */
	private boolean isSameMethodSignature(String name, String[] paramTypes, boolean isConstructor, IMethod curr, Map typeVariables) throws JavaModelException {
		if (isConstructor || name.equals(curr.getElementName())) {
			if (isConstructor == curr.isConstructor()) {
				String[] currParamTypes= curr.getParameterTypes();
				if (paramTypes.length == currParamTypes.length) {
					
					
					for (int i= 0; i < paramTypes.length; i++) {
						
						String erasure1= Signature.getTypeErasure(paramTypes[i]);
						String erasure2= Signature.getTypeErasure(currParamTypes[i]);
						String t1= Signature.getSimpleName(Signature.toString(erasure1));
						String t2= Signature.getSimpleName(Signature.toString(erasure2));
						char[] replacement= (char[]) typeVariables.get(t2);
						if (replacement != null)
							t2= String.valueOf(Signature.getSignatureSimpleName(replacement));
						if (!t1.equals(t2)) {
							return false;
						}
					}
					return true;
				}
			}
		}
		return false;
	}
}