From f3b0280cccb39e744acc2315a2e261e2e39b0117 Mon Sep 17 00:00:00 2001 From: Aman Sharma Date: Thu, 9 Dec 2021 09:59:39 +0100 Subject: [PATCH] Revert "fix: disable custom security manager for tests which indirectly look up the path of mvn executable" This reverts commit 2f7125eef3e7a5bb6576b2250de617ac0b5cee2b. --- src/test/java/sorald/ClasspathModeTest.java | 3 --- src/test/java/sorald/MavenLauncherTest.java | 6 ------ src/test/java/sorald/miner/WarningMinerTest.java | 3 --- 3 files changed, 12 deletions(-) diff --git a/src/test/java/sorald/ClasspathModeTest.java b/src/test/java/sorald/ClasspathModeTest.java index 561e4ca06..773b1ab39 100644 --- a/src/test/java/sorald/ClasspathModeTest.java +++ b/src/test/java/sorald/ClasspathModeTest.java @@ -19,9 +19,6 @@ class ClasspathModeTest { @Test void resolveClasspathFrom_enablesRepairOfViolation_thatRequiresClasspathToDetect( @TempDir File workdir) throws IOException { - // use the default security manager - System.setSecurityManager(null); - // arrange org.apache.commons.io.FileUtils.copyDirectory( TestHelper.PATH_TO_RESOURCES_FOLDER diff --git a/src/test/java/sorald/MavenLauncherTest.java b/src/test/java/sorald/MavenLauncherTest.java index 7c70e249e..dde534078 100644 --- a/src/test/java/sorald/MavenLauncherTest.java +++ b/src/test/java/sorald/MavenLauncherTest.java @@ -22,9 +22,6 @@ public class MavenLauncherTest { @Test public void sorald_repairsProductionAndTestCode_inMavenProject(@TempDir File workdir) throws IOException { - // use the default security manager - System.setSecurityManager(null); - // arrange org.apache.commons.io.FileUtils.copyDirectory( TestHelper.PATH_TO_RESOURCES_FOLDER @@ -67,9 +64,6 @@ public void sorald_repairsProductionAndTestCode_inMavenProject(@TempDir File wor @Test void sorald_repairsRuleViolation_thatRequiresClasspathToDetect(@TempDir File workdir) throws IOException { - // use the default security manager - System.setSecurityManager(null); - // arrange org.apache.commons.io.FileUtils.copyDirectory( TestHelper.PATH_TO_RESOURCES_FOLDER diff --git a/src/test/java/sorald/miner/WarningMinerTest.java b/src/test/java/sorald/miner/WarningMinerTest.java index 1e7daef52..4ab85915d 100644 --- a/src/test/java/sorald/miner/WarningMinerTest.java +++ b/src/test/java/sorald/miner/WarningMinerTest.java @@ -194,9 +194,6 @@ public void extractWarnings_statsOutput_containsExpectedAttributes() throws Exce @Test void canDetectRuleViolation_thatRequiresClasspath_whenResolvingClasspathInMavenProject( @TempDir File tempdir) throws Exception { - // use the default security manager - System.setSecurityManager(null); - Path statsFile = tempdir.toPath().resolve("stats.json"); Path projectRoot = TestHelper.PATH_TO_RESOURCES_FOLDER