Skip to content

Commit 318f453

Browse files
committed
Fix file name not applied
1 parent bc34a4b commit 318f453

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/main/java/com/diffplug/spotless/generic/LicenseHeaderStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private String addOrUpdateLicenseHeader(String raw, File file) {
323323
// fastpath where we don't need to make any changes at all
324324
boolean noPadding = beforeYearIdx == 0 && afterYearIdx + afterYear.length() == contentMatcher.start(); // allows fastpath return raw
325325
if (noPadding) {
326-
return raw;
326+
return replaceFileName(raw.substring(0, contentMatcher.start()), file) + content;
327327
}
328328
}
329329
header = beforeYear + newYear + afterYear;

0 commit comments

Comments
 (0)