Browse Source

replace usage of restricted class sun.misc.IOUtils by org.apache.commons.io.IOUtils

pull/19/head
Jochen Berger 12 years ago
parent
commit
7ec75fa147
  1. 7
      json-path/pom.xml
  2. 2
      json-path/src/test/java/com/jayway/jsonpath/HttpProviderTest.java
  3. 7
      pom.xml

7
json-path/pom.xml

@ -60,6 +60,13 @@
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>

2
json-path/src/test/java/com/jayway/jsonpath/HttpProviderTest.java

@ -33,7 +33,7 @@ public class HttpProviderTest {
try { try {
inputStream = HttpProviderFactory.getProvider().get(url); inputStream = HttpProviderFactory.getProvider().get(url);
byte[] bytes = sun.misc.IOUtils.readFully(inputStream, -1, true); byte[] bytes = org.apache.commons.io.IOUtils.toByteArray(inputStream);
String json = new String(bytes).trim(); String json = new String(bytes).trim();

7
pom.xml

@ -245,6 +245,13 @@
<version>4.10</version> <version>4.10</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
</project> </project>
Loading…
Cancel
Save