Skip to content

Commit 8bcb3c3

Browse files
authored
Merge pull request #4159 from melissalinkert/file-leak-detector-java-21
Turn off file-leak-detector if tests are run with Java 21
2 parents c824ed0 + 10c1b7e commit 8bcb3c3

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

components/test-suite/pom.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<dependency>
8787
<groupId>org.kohsuke</groupId>
8888
<artifactId>file-leak-detector</artifactId>
89-
<version>1.15</version>
89+
<version>${file-leak-detector.version}</version>
9090
<!-- the regular jar does not specify a main class -->
9191
<classifier>jar-with-dependencies</classifier>
9292
<exclusions>
@@ -129,6 +129,27 @@
129129
</plugins>
130130
</build>
131131

132+
<profiles>
133+
<profile>
134+
<id>jdk8-compatible</id>
135+
<activation>
136+
<jdk>(,11)</jdk>
137+
</activation>
138+
<properties>
139+
<file-leak-detector.version>1.15</file-leak-detector.version>
140+
</properties>
141+
</profile>
142+
<profile>
143+
<id>jdk21-compatible</id>
144+
<activation>
145+
<jdk>[11,)</jdk>
146+
</activation>
147+
<properties>
148+
<file-leak-detector.version>1.18</file-leak-detector.version>
149+
</properties>
150+
</profile>
151+
</profiles>
152+
132153
<developers>
133154
<developer>
134155
<id>curtis</id>

components/test-suite/src/loci/tests/testng/FormatReaderTestFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public class FormatReaderTestFactory {
6767

6868
@Factory
6969
public Object[] createInstances() {
70+
LOGGER.info("java.version = {}", System.getProperty("java.version"));
71+
7072
List<String> files = new ArrayList<String>();
7173

7274
// parse explicit filename, if any

0 commit comments

Comments
 (0)