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 304887
Collapse All | Expand All

(-)model/org/eclipse/jdt/core/Signature.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 2183-2188 Link Here
2183
	int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature);
2183
	int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature);
2184
	if (firstParen == -1) {
2184
	if (firstParen == -1) {
2185
		throw new IllegalArgumentException();
2185
		throw new IllegalArgumentException();
2186
	} else if (firstParen != 0 && methodSignature[0] != C_GENERIC_START) {
2187
		throw new IllegalArgumentException();
2186
	}
2188
	}
2187
2189
2188
	StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
2190
	StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
(-)src/org/eclipse/jdt/core/tests/model/SignatureTests.java (-3 / +6 lines)
Lines 1061-1069 Link Here
1061
		Signature.toString("([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true));
1061
		Signature.toString("([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true));
1062
}
1062
}
1063
public void testToStringMethod07() {
1063
public void testToStringMethod07() {
1064
	assertEquals(
1064
	try {
1065
		"java.lang.String main(java.lang.String[] args)",
1065
		Signature.toString("main([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true);
1066
		Signature.toString("main([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true));
1066
		assertTrue("Did not fail on invalid signature", false);
1067
	} catch(IllegalArgumentException e) {
1068
		// ignore
1069
	}
1067
}
1070
}
1068
public void testToStringMethod08() {
1071
public void testToStringMethod08() {
1069
	assertEquals(
1072
	assertEquals(

Return to bug 304887