You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:46:41 UTC
[sling-org-apache-sling-jcr-contentloader] 15/36: Fix input stream
handling.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.jcr.contentloader-2.0.4-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git
commit e07a62a041e7bc84f1a30eb5b6adeb406776b8fc
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jun 25 15:55:15 2008 +0000
Fix input stream handling.
git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/jcr/contentloader@671591 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/jcr/contentloader/internal/ZipReader.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
index a47d5b8..fff0c82 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
@@ -73,7 +73,6 @@ class ZipReader implements ContentReader {
throws IOException, RepositoryException {
creator.createNode(null, NT_FOLDER, null);
final ZipInputStream zis = new ZipInputStream(ins);
- final InputStream dataIS = new CloseShieldInputStream(zis);
ZipEntry entry;
do {
entry = zis.getNextEntry();
@@ -84,7 +83,7 @@ class ZipReader implements ContentReader {
if ( pos != -1 ) {
creator.switchCurrentNode(name.substring(0, pos), NT_FOLDER);
}
- creator.createFileAndResourceNode(name, dataIS, null, entry.getTime());
+ creator.createFileAndResourceNode(name, new CloseShieldInputStream(zis), null, entry.getTime());
creator.finishNode();
creator.finishNode();
if ( pos != -1 ) {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.