sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r671591 - /incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
Date Wed, 25 Jun 2008 15:55:15 GMT
Author: cziegeler
Date: Wed Jun 25 08:55:15 2008
New Revision: 671591

URL: http://svn.apache.org/viewvc?rev=671591&view=rev
Log:
Fix input stream handling.

Modified:
    incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java

Modified: incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java?rev=671591&r1=671590&r2=671591&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
(original)
+++ incubator/sling/trunk/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ZipReader.java
Wed Jun 25 08:55:15 2008
@@ -73,7 +73,6 @@
     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 @@
                     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 ) {



Mime
View raw message