Skip to content

Commit

Permalink
errorprone: BanClassLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke committed Sep 1, 2024
1 parent c2ce2fb commit 415f964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/java/emissary/roll/RollManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import emissary.config.ConfigUtil;
import emissary.core.EmissaryRuntimeException;
import emissary.test.core.junit5.UnitTest;
import emissary.util.EmissaryIsolatedClassLoaderExtension;
import emissary.test.core.junit5.extensions.EmissaryIsolatedClassLoaderExtension;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package emissary.util;
package emissary.test.core.junit5.extensions;

import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.InvocationInterceptor;
Expand Down Expand Up @@ -34,6 +34,7 @@ private static void runTestWithIsolatedClassPath(ReflectiveInvocationContext<Met

// get the original and isolated class loaders
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
@SuppressWarnings("BanClassLoader")
URLClassLoader isolatedClassLoader = new TestClassLoader();

// set the isolated class loader
Expand All @@ -51,6 +52,7 @@ private static void runTestWithIsolatedClassPath(ReflectiveInvocationContext<Met
}
}

@SuppressWarnings("BanClassLoader")
public static class TestClassLoader extends URLClassLoader {
public TestClassLoader() {
super(getUrlsFromSystemClassLoader());
Expand Down

0 comments on commit 415f964

Please sign in to comment.