Skip to content

Commit a126f76

Browse files
committed
correctly restore system property as to not affect other tests
1 parent 0c1fb65 commit a126f76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/scala/org/scalatest/tools/maven/MojoUtilsTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.scalatest.tools.maven
22

3-
import org.junit.{Before, Test}
3+
import org.junit.{After, Before, Test}
44

55
class MojoUtilsTest {
66
private var savedJavaHome: Option[String] = _
@@ -10,6 +10,7 @@ class MojoUtilsTest {
1010
savedJavaHome = Option(System.getProperty("java.home"))
1111
}
1212

13+
@After
1314
def restore() = {
1415
savedJavaHome match {
1516
case None => System.clearProperty("java.home")

0 commit comments

Comments
 (0)