Fix unit tests on Java 11 (#1483)

The unit test I18nServlet and MultiParentClassLoaderTest are failing on Java 11.
This is because they mock ClassLoaders which cause a jvm error.

The following tickets describe the problem in more detail:

- https://bugs.openjdk.java.net/browse/JDK-8254969
- https://github.com/mockito/mockito/issues/2043
- https://github.com/mockito/mockito/issues/1696
This commit is contained in:
Sebastian Sdorra
2020-12-18 14:23:36 +01:00
committed by GitHub
parent 43e6bffeca
commit dda761ffc2
7 changed files with 282 additions and 230 deletions

View File

@@ -138,7 +138,6 @@ public class I18nServlet extends HttpServlet {
return context.getStage() == Stage.PRODUCTION;
}
@VisibleForTesting
private Optional<JsonNode> collectJsonFile(String path) throws IOException {
LOG.debug("Collect plugin translations from path {} for every plugin", path);
JsonNode mergedJsonNode = null;