archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r630590 - in /maven/archiva/trunk/archiva-base/archiva-artifact-converter/src: main/java/org/apache/maven/archiva/converter/artifact/ test/java/org/apache/maven/archiva/converter/artifact/
Date Sun, 24 Feb 2008 05:12:23 GMT
Author: joakime
Date: Sat Feb 23 21:12:20 2008
New Revision: 630590

URL: http://svn.apache.org/viewvc?rev=630590&view=rev
Log:
MRM-709: Use commons-io instead of Plexus Utils 
* Eliminating AsciiFileUtil as it is now redundant.

Removed:
    maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/AsciiFileUtil.java
Modified:
    maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java
    maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/test/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverterTest.java

Modified: maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java?rev=630590&r1=630589&r2=630590&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java
(original)
+++ maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java
Sat Feb 23 21:12:20 2008
@@ -193,7 +193,7 @@
                 }
 
                 // Even if the checksums for the POM are invalid we should still convert
the POM
-                contents = AsciiFileUtil.readFile( file );
+                contents = FileUtils.readFileToString( file, null );
             }
             catch ( IOException e )
             {
@@ -209,7 +209,7 @@
                     boolean matching = false;
                     if ( !force && targetFile.exists() )
                     {
-                        String targetContents = AsciiFileUtil.readFile( targetFile );
+                        String targetContents = FileUtils.readFileToString( targetFile, null
);
                         matching = targetContents.equals( contents );
                     }
                     if ( force || !matching )
@@ -308,7 +308,7 @@
         File checksumFile = new File( file.getParentFile(), fileName );
         if ( checksumFile.exists() )
         {
-            String checksum = AsciiFileUtil.readFile( checksumFile );
+            String checksum = FileUtils.readFileToString( checksumFile, null );
             try
             {
                 digester.verify( file, checksum );

Modified: maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/test/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverterTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/test/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverterTest.java?rev=630590&r1=630589&r2=630590&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/test/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverterTest.java
(original)
+++ maven/archiva/trunk/archiva-base/archiva-artifact-converter/src/test/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverterTest.java
Sat Feb 23 21:12:20 2008
@@ -21,7 +21,6 @@
 
 import org.apache.maven.archiva.converter.artifact.ArtifactConversionException;
 import org.apache.maven.archiva.converter.artifact.ArtifactConverter;
-import org.apache.maven.archiva.converter.artifact.AsciiFileUtil;
 import org.apache.maven.archiva.converter.artifact.Messages;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -934,8 +933,8 @@
     private static void compareFiles( File expectedPomFile, File pomFile )
         throws IOException
     {
-        String expectedContent = normalizeString( AsciiFileUtil.readFile( expectedPomFile
) );
-        String targetContent = normalizeString( AsciiFileUtil.readFile( pomFile ) );
+        String expectedContent = normalizeString( org.apache.commons.io.FileUtils.readFileToString(
expectedPomFile, null ) );
+        String targetContent = normalizeString( org.apache.commons.io.FileUtils.readFileToString(
pomFile, null ) );
         assertEquals( "Check file match between " + expectedPomFile + " and " + pomFile,
expectedContent, targetContent );
     }
 



Mime
View raw message