KCr30: CheckstyleWriterTest: checkstyleTemplate: make field local variable

This commit is contained in:
Paul Campbell 2017-05-29 12:24:51 +01:00
parent d7454a1155
commit f7867283ff

View file

@ -47,8 +47,6 @@ public class CheckstyleWriterTest {
private Path outputDirectory;
private Path checkstyleTemplate;
@org.junit.Rule
public TemporaryFolder folder = new TemporaryFolder();
@ -69,7 +67,7 @@ public class CheckstyleWriterTest {
.toPath();
outputProperties.setDirectory(outputDirectory);
templateProperties = new TemplateProperties();
checkstyleTemplate = folder.newFile("checkstyle-template.xml")
val checkstyleTemplate = folder.newFile("checkstyle-template.xml")
.toPath();
Files.write(
checkstyleTemplate, TEMPLATE.getBytes(StandardCharsets.UTF_8), StandardOpenOption.TRUNCATE_EXISTING);