-
-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test failure on Java 9 and above
Java 9 modified classloading to use modules, so the default classloader presented by JUnit is not a `URLClassloader` and therefore fails the type check in `ElevatedClassLoaderFactory`. As Sonarqube always creates a classloader for each plugin during the load of that plugin, the exposing of the default App Classloader in the unit test is therefore invalid, so switching to create a custom `URLClassloader` overcomes this. Similarly, Mockito throws an exception when running in Java 9 and above on Windows due to classes eing generated in the wrong module scope. Upgrading to the latest version of Mockito overcomes this.
- Loading branch information
Showing
2 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters