1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Bug 409896 - NPE in StubUtility.getFileContent when the template is

empty
This commit is contained in:
Sergey Prigogin 2013-06-04 14:42:47 -07:00
parent 3336cd19e6
commit 2358322ab5

View file

@ -212,7 +212,7 @@ public class StubUtility {
String[] fullLine= { CodeTemplateContextType.FILE_COMMENT }; String[] fullLine= { CodeTemplateContextType.FILE_COMMENT };
String text = evaluateTemplate(context, template, fullLine); String text = evaluateTemplate(context, template, fullLine);
if (!text.endsWith(lineDelimiter)) if (text != null && !text.endsWith(lineDelimiter))
text += lineDelimiter; text += lineDelimiter;
return text; return text;
} }