incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r900443 - /incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java
Date Mon, 18 Jan 2010 16:10:37 GMT
Author: mnuttall
Date: Mon Jan 18 16:10:37 2010
New Revision: 900443

URL: http://svn.apache.org/viewvc?rev=900443&view=rev
Log:
Aries-89: Flesh out application itests

Modified:
    incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java

Modified: incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java?rev=900443&r1=900442&r2=900443&view=diff
==============================================================================
--- incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java
(original)
+++ incubator/aries/trunk/testsupport/testsupport-unit/src/main/java/org/apache/aries/unittest/fixture/ArchiveFixture.java
Mon Jan 18 16:10:37 2010
@@ -131,7 +131,7 @@
      * @return
      */
     public ZipFixture end() {
-      return parent;
+      return (parent == null) ? (ZipFixture) this : parent;
     }
   }
 
@@ -452,17 +452,15 @@
        * For better reuse this method delegate the writing to writeAllEntries, which
        * can be reused by the JarFixture.
        */
-      if (bytes == null) {
-        ByteArrayOutputStream bout = new ByteArrayOutputStream();
-        ZipOutputStream zout = new ZipOutputStream(bout);
-        try {
-          writeAllEntries(zout);
-        } finally {
-          zout.close();
-        }
-        
-        bytes = bout.toByteArray();
+      ByteArrayOutputStream bout = new ByteArrayOutputStream();
+      ZipOutputStream zout = new ZipOutputStream(bout);
+      try {
+        writeAllEntries(zout);
+      } finally {
+        zout.close();
       }
+      
+      bytes = bout.toByteArray();
 
       ByteArrayInputStream bin = new ByteArrayInputStream(bytes);
       copy(bin, out);



Mime
View raw message