String (String fileName, @NotNull FileTemplate template) { if (!StringUtil.isEmpty(template.getExtension())) { // can be empty, e.g. Dockerfile String suggestedFileNameEnd = "." + template.getExtension(); if (!fileName.endsWith(suggestedFileNameEnd)) { fileName += suggestedFileNameEnd; } } return fileName; }