Author: fanningpj
Date: Wed Jun 5 16:45:46 2024
New Revision: 1918177
URL: http://svn.apache.org/viewvc?rev=1918177&view=rev
Log:
getNextZipEntry deprecation warnings
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestDecryptor.java
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java?rev=1918177&r1=1918176&r2=1918177&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java
(original)
+++
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java
Wed Jun 5 16:45:46 2024
@@ -135,7 +135,7 @@ public final class AesZipFileZipEntrySou
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());
Modified:
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestDecryptor.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestDecryptor.java?rev=1918177&r1=1918176&r2=1918177&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestDecryptor.java
(original)
+++
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestDecryptor.java
Wed Jun 5 16:45:46 2024
@@ -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());
Modified:
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java?rev=1918177&r1=1918176&r2=1918177&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
(original)
+++
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
Wed Jun 5 16:45:46 2024
@@ -1496,7 +1496,7 @@ public final class TestXSSFWorkbook exte
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);
Modified:
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java?rev=1918177&r1=1918176&r2=1918177&view=diff
==============================================================================
---
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
(original)
+++
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
Wed Jun 5 16:45:46 2024
@@ -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.Encryp
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;
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]