< prev index next >

test/sun/security/tools/jarsigner/EntriesOrder.java

Print this page
rev 16983 : [mq]: 8180397

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -43,12 +43,10 @@
 import java.util.jar.JarFile;
 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 {
 
         String[] entries = {

@@ -112,11 +110,11 @@
             int cc = 0;
             try (JarFile jf = new JarFile("x.jar")) {
                 Enumeration<JarEntry> jes = jf.entries();
                 while (jes.hasMoreElements()) {
                     JarEntry je = jes.nextElement();
-                    IOUtils.readFully(jf.getInputStream(je));
+                    jf.getInputStream(je).readAllBytes();
                     Certificate[] certs = je.getCertificates();
                     if (certs != null && certs.length > 0) {
                         cc++;
                     }
                 }

@@ -144,11 +142,11 @@
             try (JarInputStream jis
                          = new JarInputStream(new FileInputStream("x.jar"))) {
                 while (true) {
                     JarEntry je = jis.getNextJarEntry();
                     if (je == null) break;
-                    IOUtils.readFully(jis);
+                    jis.readAllBytes();
                     Certificate[] certs = je.getCertificates();
                     if (certs != null && certs.length > 0) {
                         cc++;
                     }
                 }
< prev index next >