mirror of https://github.com/apache/poi.git
getNextZipEntry deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1a982a2fb
commit
41ccb6fe30
|
@ -135,7 +135,7 @@ public final class AesZipFileZipEntrySource implements ZipEntrySource {
|
|||
ZipArchiveOutputStream zos = new ZipArchiveOutputStream(fos)) {
|
||||
|
||||
ZipArchiveEntry ze;
|
||||
while ((ze = zis.getNextZipEntry()) != null) {
|
||||
while ((ze = zis.getNextEntry()) != null) {
|
||||
// the cipher output stream pads the data, therefore we can't reuse the ZipEntry with set sizes
|
||||
// as those will be validated upon close()
|
||||
ZipArchiveEntry zeNew = new ZipArchiveEntry(ze.getName());
|
||||
|
|
|
@ -84,7 +84,7 @@ class TestDecryptor {
|
|||
try (ZipArchiveInputStream zin = new ZipArchiveInputStream(d.getDataStream(root))) {
|
||||
|
||||
while (true) {
|
||||
ZipArchiveEntry entry = zin.getNextZipEntry();
|
||||
ZipArchiveEntry entry = zin.getNextEntry();
|
||||
if (entry == null) {
|
||||
break;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class TestDecryptor {
|
|||
ZipArchiveInputStream zin = new ZipArchiveInputStream(new ByteArrayInputStream(buf));
|
||||
|
||||
while (true) {
|
||||
ZipArchiveEntry entry = zin.getNextZipEntry();
|
||||
ZipArchiveEntry entry = zin.getNextEntry();
|
||||
if (entry==null) {
|
||||
break;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class TestDecryptor {
|
|||
try (final ZipArchiveInputStream zis = new ZipArchiveInputStream(d.getDataStream(fs))) {
|
||||
int[] sizes = { 3711, 1155, 445, 9376, 450, 588, 1337, 2593, 304, 7910 };
|
||||
for (int size : sizes) {
|
||||
final ZipArchiveEntry ze = zis.getNextZipEntry();
|
||||
final ZipArchiveEntry ze = zis.getNextEntry();
|
||||
assertNotNull(ze);
|
||||
IOUtils.copy(zis, bos);
|
||||
assertEquals(size, bos.size());
|
||||
|
|
|
@ -1496,7 +1496,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
|
|||
int count = 0;
|
||||
try (ZipArchiveInputStream zis = new ZipArchiveInputStream(Files.newInputStream(tempFile.toPath()))) {
|
||||
ZipArchiveEntry entry;
|
||||
while ((entry = zis.getNextZipEntry()) != null) {
|
||||
while ((entry = zis.getNextEntry()) != null) {
|
||||
// Since POI 5.2.5, you can stop XSSFWorkbook closing the InputStream by using this new constructor
|
||||
XSSFWorkbook wb = new XSSFWorkbook(zis, false);
|
||||
assertNotNull(wb);
|
||||
|
|
|
@ -29,6 +29,7 @@ import javax.crypto.CipherInputStream;
|
|||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import org.apache.commons.io.input.BoundedInputStream;
|
||||
import org.apache.poi.EncryptedDocumentException;
|
||||
import org.apache.poi.poifs.crypt.ChainingMode;
|
||||
import org.apache.poi.poifs.crypt.CryptoFunctions;
|
||||
|
@ -38,7 +39,6 @@ import org.apache.poi.poifs.crypt.EncryptionVerifier;
|
|||
import org.apache.poi.poifs.crypt.HashAlgorithm;
|
||||
import org.apache.poi.poifs.filesystem.DirectoryNode;
|
||||
import org.apache.poi.poifs.filesystem.DocumentInputStream;
|
||||
import org.apache.commons.io.input.BoundedInputStream;
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue