]> source.dussan.org Git - archiva.git/commitdiff
MRM-709: Use commons-io instead of Plexus Utils
authorJoakim Erdfelt <joakime@apache.org>
Fri, 14 Mar 2008 05:53:11 +0000 (05:53 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Fri, 14 Mar 2008 05:53:11 +0000 (05:53 +0000)
* Fixing build error.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@637001 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java

index 05652f554cdf0bf85734987ae0f4ce653f807e13..947e820393a0d5d089a05576bf832dc18a11b140 100644 (file)
@@ -19,6 +19,7 @@ package org.apache.maven.archiva.transaction;
  * under the License.
  */
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.digest.Digester;
@@ -81,30 +82,12 @@ public abstract class AbstractFileEventTest
     protected String readFile( File file )
         throws IOException
     {
-        FileInputStream in = null;
-        try
-        {
-            in = new FileInputStream( file );
-            return IOUtils.toString( in );
-        }
-        finally
-        {
-            IOUtil.close( in );
-        }
+        return FileUtils.readFileToString( file );
     }
 
     protected void writeFile( File file, String content )
         throws IOException
     {
-        FileOutputStream out = null;
-        try
-        {
-            out = new FileOutputStream( file );
-            IOUtil.copy( content, out );
-        }
-        finally
-        {
-            IOUtil.close( out );
-        }
+        FileUtils.writeStringToFile( file, content );
     }
 }
\ No newline at end of file