1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

Bug 350242 - NullPointerException in creation of new class.

This commit is contained in:
Sergey Prigogin 2011-06-24 18:51:30 -07:00
parent 550496d56c
commit b5b6ad368e

View file

@ -467,10 +467,12 @@ public class NewClassCodeGenerator {
String body = constructMethodDeclarations(tu, publicMethods, protectedMethods,
privateMethods, lineDelimiter);
body = CodeGeneration.getClassBodyContent(tu, fClassName, body, lineDelimiter);
if (body != null) {
code.append(body);
if (!body.endsWith(lineDelimiter)) {
code.append(lineDelimiter);
}
}
code.append("};"); //$NON-NLS-1$
return removeRedundantVisibilityLabels(code.toString());
}