JDK16 Support (#4785)
* JDK16 Support
Signed-off-by: jansupol <jan.supol@oracle.com>
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 523326d..9ecbc63 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -212,7 +212,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/core-common/src/test/java/org/glassfish/jersey/logging/LoggingInterceptorTest.java b/core-common/src/test/java/org/glassfish/jersey/logging/LoggingInterceptorTest.java
index c19cb19..9034406 100644
--- a/core-common/src/test/java/org/glassfish/jersey/logging/LoggingInterceptorTest.java
+++ b/core-common/src/test/java/org/glassfish/jersey/logging/LoggingInterceptorTest.java
@@ -150,8 +150,8 @@
private Answer<?> chunk(int size, char filler) {
return invocation -> {
- byte[] buf = invocation.getArgumentAt(0, byte[].class);
- int offset = invocation.getArgumentAt(1, Integer.class);
+ byte[] buf = invocation.getArgument(0, byte[].class);
+ int offset = invocation.getArgument(1, Integer.class);
Arrays.fill(buf, offset, offset + size, (byte) filler);
return size;
};
diff --git a/core-common/src/test/resources/surefire.policy b/core-common/src/test/resources/surefire.policy
index 530db3c..850e4b3 100644
--- a/core-common/src/test/resources/surefire.policy
+++ b/core-common/src/test/resources/surefire.policy
@@ -38,6 +38,7 @@
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
permission java.lang.RuntimePermission "reflectionFactoryAccess";
+ permission java.lang.RuntimePermission "getProtectionDomain"; // mockito for JDK<16
};
grant codebase "file:${project.build.directory}/classes/-" {