Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding try/catch around close() call of the class loader #2

Merged
merged 3 commits into from
Feb 26, 2019
Merged

Adding try/catch around close() call of the class loader #2

merged 3 commits into from
Feb 26, 2019

Conversation

xdevroey
Copy link
Collaborator

As suggested by @apanichella, I have added a try/catch statement around the close method call of the class loader to print an error message and continue the execution. The problem is related to a security policy of the JVM security manager, as indicated in the error messages:

Running the tests: [SBSTDummyForCoverageAndMutationCalculation, org.jsoup.parser.TokenQueue_ESTest]
Could not run the compiled tests!
java.util.concurrent.ExecutionException: java.lang.SecurityException: Security manager blocks ("java.lang.RuntimePermission" "closeClassLoader")
java.lang.Thread.getStackTrace(Thread.java:1559)
org.evosuite.runtime.sandbox.MSecurityManager.checkPermission(MSecurityManager.java:434)
java.net.URLClassLoader.close(URLClassLoader.java:290)
sbst.benchmark.coverage.TestExecutionTask.call(TestExecutionTask.java:65)
sbst.benchmark.coverage.TestExecutionTask.call(TestExecutionTask.java:17)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

@kifetew kifetew merged commit b01e2dc into PROSRESEARCHCENTER:master Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants