1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

FIXED - bug 291268: Source->Implement Method goes into an infinite loop for parameter with white spaces in type name

https://bugs.eclipse.org/bugs/show_bug.cgi?id=291268
This commit is contained in:
Emanuel Graf 2009-10-21 09:20:31 +00:00
parent d2cb70aeb5
commit 45872aa127

View file

@ -38,7 +38,19 @@ public class PseudoNameGenerator {
if(typeName.length() != 0) {
typeName = typeName.substring(0, 1).toLowerCase() + typeName.substring(1);
}
nameParts = typeName.split("\\s"); //$NON-NLS-1$
for (int i = 0; i < nameParts.length; i++) {
if(i <= 0) {
typeName = nameParts[i];
}else {
typeName = typeName.concat(nameParts[i].substring(0,1).toUpperCase());
if(nameParts[i].length() > 1) {
typeName = typeName.concat(nameParts[i].substring(1));
}
}
}
String numberString = ""; //$NON-NLS-1$
String newNameCandidate;
int index = 0;