aboutsummaryrefslogtreecommitdiff
path: root/test/sun/security/tools/jarsigner/EntriesOrder.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/sun/security/tools/jarsigner/EntriesOrder.java')
-rw-r--r--test/sun/security/tools/jarsigner/EntriesOrder.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/sun/security/tools/jarsigner/EntriesOrder.java b/test/sun/security/tools/jarsigner/EntriesOrder.java
index 96c90e98e1..908f6ef48b 100644
--- a/test/sun/security/tools/jarsigner/EntriesOrder.java
+++ b/test/sun/security/tools/jarsigner/EntriesOrder.java
@@ -25,6 +25,9 @@
* @test
* @bug 8031572
* @summary jarsigner -verify exits with 0 when a jar file is not properly signed
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.IOUtils
+ * @run main EntriesOrder
*/
import java.io.FileInputStream;
@@ -39,6 +42,8 @@ import java.util.jar.JarInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
+import jdk.testlibrary.IOUtils;
+
public class EntriesOrder {
public static void main(String[] args) throws Exception {
@@ -106,7 +111,7 @@ public class EntriesOrder {
Enumeration<JarEntry> jes = jf.entries();
while (jes.hasMoreElements()) {
JarEntry je = jes.nextElement();
- sun.misc.IOUtils.readFully(jf.getInputStream(je), -1, true);
+ IOUtils.readFully(jf.getInputStream(je));
Certificate[] certs = je.getCertificates();
if (certs != null && certs.length > 0) {
cc++;
@@ -138,7 +143,7 @@ public class EntriesOrder {
while (true) {
JarEntry je = jis.getNextJarEntry();
if (je == null) break;
- sun.misc.IOUtils.readFully(jis, -1, true);
+ IOUtils.readFully(jis);
Certificate[] certs = je.getCertificates();
if (certs != null && certs.length > 0) {
cc++;