File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/checkstyle/autofix/recipe Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public class Header extends Recipe {
4444 private static final String HEADER_FILE_PROPERTY = "headerFile" ;
4545 private static final String IGNORE_LINES_PROPERTY = "ignoreLines" ;
4646 private static final String CHARSET_PROPERTY = "charset" ;
47+ private static final String LINE_SEPRATOR = "\n " ;
4748
4849 private final List <CheckstyleViolation > violations ;
4950 private final CheckConfiguration config ;
@@ -129,7 +130,7 @@ public J visit(Tree tree, ExecutionContext ctx) {
129130 currentHeader , ignoreLines );
130131
131132 sourceFile = sourceFile .withPrefix (
132- Space .format (fixedHeader + System . lineSeparator () ));
133+ Space .format (fixedHeader + LINE_SEPRATOR ));
133134 }
134135 result = super .visit (sourceFile , ctx );
135136 }
@@ -166,7 +167,7 @@ private static String fixHeaderLines(String licenseHeader,
166167 }
167168 }
168169
169- return String .join (System . lineSeparator () , currentLines );
170+ return String .join (LINE_SEPRATOR , currentLines );
170171 }
171172
172173 private boolean hasViolation (Path filePath ) {
You can’t perform that action at this time.
0 commit comments