Skip to content

Commit

Permalink
Merge pull request ome#4159 from melissalinkert/file-leak-detector-ja…
Browse files Browse the repository at this point in the history
…va-21

Turn off file-leak-detector if tests are run with Java 21
  • Loading branch information
sbesson authored Mar 18, 2024
2 parents c824ed0 + 10c1b7e commit 8bcb3c3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 22 additions & 1 deletion components/test-suite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>file-leak-detector</artifactId>
<version>1.15</version>
<version>${file-leak-detector.version}</version>
<!-- the regular jar does not specify a main class -->
<classifier>jar-with-dependencies</classifier>
<exclusions>
Expand Down Expand Up @@ -129,6 +129,27 @@
</plugins>
</build>

<profiles>
<profile>
<id>jdk8-compatible</id>
<activation>
<jdk>(,11)</jdk>
</activation>
<properties>
<file-leak-detector.version>1.15</file-leak-detector.version>
</properties>
</profile>
<profile>
<id>jdk21-compatible</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<file-leak-detector.version>1.18</file-leak-detector.version>
</properties>
</profile>
</profiles>

<developers>
<developer>
<id>curtis</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public class FormatReaderTestFactory {

@Factory
public Object[] createInstances() {
LOGGER.info("java.version = {}", System.getProperty("java.version"));

List<String> files = new ArrayList<String>();

// parse explicit filename, if any
Expand Down

0 comments on commit 8bcb3c3

Please sign in to comment.