mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +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,
|
||||
privateMethods, lineDelimiter);
|
||||
body = CodeGeneration.getClassBodyContent(tu, fClassName, body, lineDelimiter);
|
||||
code.append(body);
|
||||
if (!body.endsWith(lineDelimiter)) {
|
||||
code.append(lineDelimiter);
|
||||
if (body != null) {
|
||||
code.append(body);
|
||||
if (!body.endsWith(lineDelimiter)) {
|
||||
code.append(lineDelimiter);
|
||||
}
|
||||
}
|
||||
code.append("};"); //$NON-NLS-1$
|
||||
return removeRedundantVisibilityLabels(code.toString());
|
||||
|
|
Loading…
Add table
Reference in a new issue