ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1467936 - in /ace/trunk/org.apache.ace.deployment: src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java
Date Mon, 15 Apr 2013 11:05:21 GMT
Author: marrs
Date: Mon Apr 15 11:05:21 2013
New Revision: 1467936

URL: http://svn.apache.org/r1467936
Log:
ACE-332 Forgot to commit the deployment part. Done now, including some fixes for the unit
tests.

Modified:
    ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java
    ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java

Modified: ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java?rev=1467936&r1=1467935&r2=1467936&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java
(original)
+++ ace/trunk/org.apache.ace.deployment/src/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProvider.java
Mon Apr 15 11:05:21 2013
@@ -32,6 +32,7 @@ import java.util.Dictionary;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.zip.GZIPInputStream;
 
 import javax.xml.parsers.SAXParserFactory;
 
@@ -415,7 +416,7 @@ public class RepositoryBasedProvider imp
             }
         }
 
-        return result;
+        return new GZIPInputStream(result);
     }
     
     private boolean isCacheUpToDate() {

Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java?rev=1467936&r1=1467935&r2=1467936&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java
(original)
+++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/MockDeploymentRepository.java
Mon Apr 15 11:05:21 2013
@@ -19,8 +19,10 @@
 package org.apache.ace.deployment.provider.repositorybased;
 
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.zip.GZIPOutputStream;
 
 import org.apache.ace.range.SortedRangeSet;
 import org.apache.ace.repository.Repository;
@@ -45,7 +47,12 @@ public class MockDeploymentRepository im
             throw new IOException("Checkout exception.");
         }
         else {
-            return new ByteArrayInputStream(m_xmlRepository.getBytes());
+        	ByteArrayOutputStream compressedBytes = new ByteArrayOutputStream();
+			GZIPOutputStream zip = new GZIPOutputStream(compressedBytes);
+        	byte[] bytes = m_xmlRepository.getBytes();
+			zip.write(bytes, 0, bytes.length);
+			zip.finish();
+            return new ByteArrayInputStream(compressedBytes.toByteArray());
         }
     }
 



Mime
View raw message