From 4cca4286a15ad566d3a4d7e561fad488893c2609 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 May 2017 13:31:56 +0100 Subject: [PATCH] KXR36: plugin: DefaultCheckstyleExecutorTest: artifactFile: make local variable --- .../ruleset/plugin/DefaultCheckstyleExecutorTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java index b230eeb..8abc7b1 100644 --- a/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java +++ b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java @@ -72,8 +72,6 @@ public class DefaultCheckstyleExecutorTest { @Mock private Artifact artifact; - private File artifactFile; - @Mock private MavenXpp3Reader mavenXpp3Reader; @@ -122,8 +120,8 @@ public class DefaultCheckstyleExecutorTest { .level(level) .build(); - artifactFile = folder.newFile("pom.xml"); given(artifactRepository.find(any())).willReturn(artifact); + final File artifactFile = folder.newFile("pom.xml"); given(artifact.getFile()).willReturn(artifactFile); given(mavenXpp3Reader.read(any(FileReader.class))).willReturn(pomModel); final Properties properties = new Properties();