diff options
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java')
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java index d53a69d6ff0..e11f01fabd3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java @@ -117,7 +117,7 @@ public class StubUtility { }; String text = evaluateTemplate(context, template, fullLine); - if (!text.endsWith(lineDelimiter)) + if (text != null && !text.endsWith(lineDelimiter)) text += lineDelimiter; return text; } @@ -164,7 +164,7 @@ public class StubUtility { CodeTemplateContextType.TYPE_COMMENT }; String text = evaluateTemplate(context, template, fullLine); - if (!text.endsWith(lineDelimiter)) + if (text != null && !text.endsWith(lineDelimiter)) text += lineDelimiter; return text; } |