Skip to content

Commit 536c29e

Browse files
froqueslandelle
authored andcommitted
Replace system-rules with system-stubs-junit4
system-rules no longer works with Java 17. system-stubs-junit4 is a fork that works with all JDK versions.
1 parent 344ee77 commit 536c29e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@
296296
<scope>test</scope>
297297
</dependency>
298298
<dependency>
299-
<groupId>com.github.stefanbirkner</groupId>
300-
<artifactId>system-rules</artifactId>
301-
<version>1.19.0</version>
299+
<groupId>uk.org.webcompere</groupId>
300+
<artifactId>system-stubs-junit4</artifactId>
301+
<version>2.1.3</version>
302302
<scope>test</scope>
303303
</dependency>
304304
</dependencies>
@@ -469,10 +469,10 @@
469469
<doclint>-missing</doclint>
470470
<links>
471471
<!--link>http://java.sun.com/j2se/${maven.compiler.source}/docs/api/</link-->
472-
<link>http://slf4j.org/api/</link>
473-
<link>http://commons.apache.org/lang/api-release/</link>
474-
<link>http://commons.apache.org/io/api-release/</link>
475-
<link>http://junit.sourceforge.net/javadoc/</link>
472+
<link>https://slf4j.org/api/</link>
473+
<link>https://commons.apache.org/proper/commons-lang/javadocs/api-release/</link>
474+
<link>https://commons.apache.org/proper/commons-io/javadocs/api-release/</link>
475+
<link>https://junit.org/junit4/javadoc/latest/</link>
476476
</links>
477477
<!-- additionalparam>-nopackagediagram</additionalparam-->
478478
<!-- additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam-->
@@ -769,4 +769,4 @@
769769
</build>
770770
</profile>
771771
</profiles>
772-
</project>
772+
</project>

src/test/java/util/JavaLocatorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import org.apache.maven.toolchain.Toolchain;
1111
import org.junit.Rule;
1212
import org.junit.Test;
13-
import org.junit.contrib.java.lang.system.EnvironmentVariables;
13+
import uk.org.webcompere.systemstubs.rules.EnvironmentVariablesRule;
1414

1515
public class JavaLocatorTest {
1616

17-
@Rule public final EnvironmentVariables environmentVariables = new EnvironmentVariables();
17+
@Rule public final EnvironmentVariablesRule environmentVariables = new EnvironmentVariablesRule();
1818

1919
@Test
2020
public void shouldReturnNotNullWhenJavaIsNotAvailableOnCommandLineAndJavaHomeIsPresent() {

0 commit comments

Comments
 (0)