diff --git a/pom.xml b/pom.xml
index 0abb303..44c3141 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,17 +34,18 @@
- 2.9
+ 3.0.0
3.20.21
2.0.1
1.11.0
2.3.0
0.9.1
-
- 1.1.0
- ${project.build.directory}/schemas
+ 1.70
+ 1.4.0
+ 2.3.0
2.5.5
+ 0.19
graviteeio-apim/plugins/policies
@@ -105,6 +106,14 @@
provided
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+ ${bcprov-jdk15on.version}
+ compile
+
+
org.slf4j
@@ -121,7 +130,7 @@
javax.xml.bind
jaxb-api
- 2.3.0
+ ${jaxb-api.version}
@@ -137,17 +146,10 @@
test
-
- commons-io
- commons-io
- 1.3.2
- test
-
-
org.skyscreamer
jsonassert
- 1.4.0
+ ${jsonassert.version}
test
@@ -157,25 +159,6 @@
${gravitee-apim.version}
test
-
-
- commons-collections
- commons-collections
- 3.2.2
- test
-
-
- org.bouncycastle
- bcprov-jdk15on
- 1.70
- compile
-
-
- org.apache.xmlbeans
- xmlbeans
- 3.1.0
- test
-
@@ -224,22 +207,10 @@
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.11.0
-
com.hubspot.maven.plugins
prettier-maven-plugin
+ ${prettier-maven-plugin.version}
diff --git a/src/test/java/io/gravitee/policy/jws/JWSPolicyTest.java b/src/test/java/io/gravitee/policy/jws/JWSPolicyTest.java
index 0ef8956..10c6dec 100644
--- a/src/test/java/io/gravitee/policy/jws/JWSPolicyTest.java
+++ b/src/test/java/io/gravitee/policy/jws/JWSPolicyTest.java
@@ -45,7 +45,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import org.apache.commons.io.IOUtils;
import org.junit.*;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -407,11 +406,12 @@ private PrivateKey getPrivateKeyFromDerFile() throws Exception {
return kf.generatePrivate(spec);
}
- private String loadResource(String resource) throws IOException {
- InputStream is = this.getClass().getResourceAsStream(resource);
- StringWriter sw = new StringWriter();
- IOUtils.copy(is, sw, "UTF-8");
- return sw.toString();
+ private String loadResource(String resource) {
+ try (InputStream is = this.getClass().getResourceAsStream(resource)) {
+ return new String(Objects.requireNonNull(is).readAllBytes(), StandardCharsets.UTF_8);
+ } catch (Exception e) {
+ return "";
+ }
}
private void encodeUInt32(int value, OutputStream out) throws IOException {