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:
parent
550496d56c
commit
b5b6ad368e
1 changed files with 5 additions and 3 deletions
|
@ -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());
|
||||||
|
|
Loading…
Add table
Reference in a new issue