diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-22 00:19:12 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-22 00:19:12 +0000 |
commit | dea7c951bb11232ff343c3dc497cb471e0c6f350 (patch) | |
tree | c9bc2b879a437b5530344c541ab00578af029304 | |
parent | ac56bc174e85292b7cf8e25a1bcfb427e8a6d6d3 (diff) | |
download | poi-dea7c951bb11232ff343c3dc497cb471e0c6f350.tar.gz poi-dea7c951bb11232ff343c3dc497cb471e0c6f350.zip |
refactor IOUtils.toByteArray
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898292 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java | 2 | ||||
-rw-r--r-- | poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java index 6203e49c27..427bdff7bf 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java @@ -242,7 +242,7 @@ public class TimeStampSimpleHttpClient implements TimeStampHttpClient { } try (InputStream is = huc.getInputStream()) { - responseBytes = IOUtils.toByteArray(is, Integer.MIN_VALUE, getMaxTimestampResponseSize()); + responseBytes = IOUtils.toByteArrayWithMaxLength(is, getMaxTimestampResponseSize()); } break; default: diff --git a/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java b/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java index 06cadf6c0f..748d45da66 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java @@ -296,7 +296,6 @@ public final class TestPOIXMLDocument { } } - @Disabled("needs investigation") @Test void testOSGIClassLoading() throws IOException { byte[] data; |