]> source.dussan.org Git - poi.git/commitdiff
refactor IOUtils.toByteArray
authorPJ Fanning <fanningpj@apache.org>
Tue, 22 Feb 2022 00:19:12 +0000 (00:19 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 22 Feb 2022 00:19:12 +0000 (00:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898292 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java
poi-ooxml/src/test/java/org/apache/poi/ooxml/TestPOIXMLDocument.java

index 6203e49c27085b554f6007d07eb477f8ae8ae69d..427bdff7bfc25aceafea0b03cd39db9a64e01149 100644 (file)
@@ -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:
index 06cadf6c0f25d6674b603902318fa945ff17e471..748d45da6674361775cfe74d309f17c290cc0deb 100644 (file)
@@ -296,7 +296,6 @@ public final class TestPOIXMLDocument {
         }
     }
 
-    @Disabled("needs investigation")
     @Test
     void testOSGIClassLoading() throws IOException {
         byte[] data;