< prev index next >

test/java/util/zip/ZipFile/ZipEntryFreeTest.java

Print this page
rev 17324 : 8181759: add explicit @build actions for jdk.test.lib classes in all :tier1 tests
Reviewed-by: duke


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 6907252
  26  * @summary ZipFileInputStream Not Thread-Safe
  27  * @library /test/lib







  28  * @run main ZipEntryFreeTest
  29  */
  30 
  31 import java.io.*;
  32 import java.nio.file.Paths;
  33 import java.util.Random;
  34 import java.util.Timer;
  35 import java.util.TimerTask;
  36 import java.util.zip.*;
  37 import jdk.test.lib.util.FileUtils;
  38 
  39 public class ZipEntryFreeTest extends Thread {
  40 
  41     private static final int NUM_THREADS = 5;
  42     private static final int TEST_ITERATIONS = 5;
  43     private static final String ZIPFILE_NAME = "large.zip";
  44     private static final String ZIPENTRY_NAME = "random.txt";
  45     private static InputStream is = null;
  46     final Timer timer = new Timer();
  47 




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 6907252
  26  * @summary ZipFileInputStream Not Thread-Safe
  27  * @library /test/lib
  28  * @build jdk.test.lib.Platform
  29  *        jdk.test.lib.Utils
  30  *        jdk.test.lib.Asserts
  31  *        jdk.test.lib.JDKToolFinder
  32  *        jdk.test.lib.JDKToolLauncher
  33  *        jdk.test.lib.process.*
  34  *        jdk.test.lib.util.FileUtils
  35  * @run main ZipEntryFreeTest
  36  */
  37 
  38 import java.io.*;
  39 import java.nio.file.Paths;
  40 import java.util.Random;
  41 import java.util.Timer;
  42 import java.util.TimerTask;
  43 import java.util.zip.*;
  44 import jdk.test.lib.util.FileUtils;
  45 
  46 public class ZipEntryFreeTest extends Thread {
  47 
  48     private static final int NUM_THREADS = 5;
  49     private static final int TEST_ITERATIONS = 5;
  50     private static final String ZIPFILE_NAME = "large.zip";
  51     private static final String ZIPENTRY_NAME = "random.txt";
  52     private static InputStream is = null;
  53     final Timer timer = new Timer();
  54 


< prev index next >