/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6836682 7025988
* @summary JavacFileManager handling of zip64 archives (Scenario A and B)
* @compile -XDignore.symbol.file T6836682.java Utils.java
* @run main T6836682
*/
/*
* This test consists of two scenarios:
*
* Scenario A: create a jar with entries exceeding 64K, and see if the javac
* can handle this large jar on the classpath. Generally this test completes
* within a minute
*
* Scenario B: create a jar with a large enough file exceeding 4GB, and
* similarly test javac. This test is known to be slow and problematic on
* certain operating systems, thus this test can be selected by passing a
* property through jtreg as follows:
* -javaoptions=-DT6836682.testScenarioB=true.
* Note this test will only run iff all the disk requirements are met at runtime.
*/
public class T6836682 {
}
byte[] buffer = new byte[BUFFER_LEN];
for (long i = 0; i < count; i++) {
}
}
byte[] buffer = new byte[8192];
try {
while (n > 0) {
}
} finally {
}
}
byte[] buffer = new byte[BUFFER_LEN];
for (long i = 0; i < count; i++) {
}
}
long minlength) throws IOException {
try {
zos.closeEntry();
} finally {
}
// deleted to prevent accidental linkage
}
try {
for (int i = 0; i < MAX ; i++) {
}
// add a class file
} finally {
// deleted to prevent accidental linkage
}
}
// a jar with entries exceeding 64k + a class file for the existential test
try {
throw new IOException("test failed");
}
} finally {
}
}
// a jar with an enormous file + a class file for the existential test
try {
throw new IOException("test failed");
}
} finally {
}
} else {
" requirements exceeds available space");
}
}
} else {
}
}
}