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,9 +467,11 @@ public class NewClassCodeGenerator {
String body = constructMethodDeclarations(tu, publicMethods, protectedMethods, String body = constructMethodDeclarations(tu, publicMethods, protectedMethods,
privateMethods, lineDelimiter); privateMethods, lineDelimiter);
body = CodeGeneration.getClassBodyContent(tu, fClassName, body, lineDelimiter); body = CodeGeneration.getClassBodyContent(tu, fClassName, body, lineDelimiter);
code.append(body); if (body != null) {
if (!body.endsWith(lineDelimiter)) { code.append(body);
code.append(lineDelimiter); if (!body.endsWith(lineDelimiter)) {
code.append(lineDelimiter);
}
} }
code.append("};"); //$NON-NLS-1$ code.append("};"); //$NON-NLS-1$
return removeRedundantVisibilityLabels(code.toString()); return removeRedundantVisibilityLabels(code.toString());