Skip to content

Commit 8082092

Browse files
committed
Fix compilation error in MavenITmng11133MixinsPrecedenceTest
The test was using verifier.loadFile() which returns List<String> but assigning it to a String variable. Changed to use Files.readString() to read the file content as a String, which matches the expected variable type. This fixes the compilation error: incompatible types: java.lang.String cannot be converted to java.io.File
1 parent 06209a6 commit 8082092

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng11133MixinsPrecedenceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.apache.maven.it;
2020

2121
import java.io.File;
22+
import java.nio.file.Files;
2223

2324
import org.junit.jupiter.api.Test;
2425

@@ -46,7 +47,7 @@ public void testMixinOverridesParentProperty() throws Exception {
4647
verifier.verifyErrorFreeLog();
4748

4849
verifier.verifyFilePresent("target/effective-pom.xml");
49-
String effectivePom = verifier.loadFile("target/effective-pom.xml", false);
50+
String effectivePom = Files.readString(new File(testDir, "target/effective-pom.xml").toPath());
5051
assertTrue(effectivePom.contains("<maven.compiler.release>21</maven.compiler.release>"));
5152
}
5253
}

0 commit comments

Comments
 (0)