< prev index next >
test/jdk/java/util/zip/DeflateIn_InflateOut.java
Print this page
rev 58172 : 8240226: DeflateIn_InflateOut.java test incorrectly assumes size of compressed file
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2020, 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.
@@ -40,12 +40,10 @@
private static ByteArrayOutputStream baos;
private static InflaterOutputStream ios;
private static void reset() {
- new Random(new Date().getTime()).nextBytes(data);
-
bais = new ByteArrayInputStream(data);
dis = new DeflaterInputStream(bais);
baos = new ByteArrayOutputStream();
ios = new InflaterOutputStream(baos);
@@ -216,10 +214,12 @@
check(numNotSkipped + numSkipBytes == numReadable);
}
public static void realMain(String[] args) throws Throwable {
+ new Random(new Date().getTime()).nextBytes(data);
+
ArrayReadWrite();
ArrayReadByteWrite();
ByteReadArrayWrite();
< prev index next >