diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-15 21:37:35 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-15 21:37:35 +0000 |
commit | 833d272ab4200f032d456a72e1e316ed64acd304 (patch) | |
tree | 856228fd6f03802d17058e8c607c643f4a1fd330 /archiva-modules/archiva-base/archiva-artifact-converter/src/main | |
parent | 762f11300b0ed3eda5863b28d3201bf72471415d (diff) | |
download | archiva-833d272ab4200f032d456a72e1e316ed64acd304.tar.gz archiva-833d272ab4200f032d456a72e1e316ed64acd304.zip |
fix compilation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1385187 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-artifact-converter/src/main')
-rw-r--r-- | archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java b/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java index 827c80ece..c777b32a1 100644 --- a/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java +++ b/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java @@ -57,6 +57,7 @@ import java.io.FileReader; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -66,10 +67,8 @@ import java.util.regex.Matcher; /** * LegacyToDefaultConverter - * - * */ -@Service( "artifactConverter#legacy-to-default" ) +@Service ("artifactConverter#legacy-to-default") public class LegacyToDefaultConverter implements ArtifactConverter { @@ -186,7 +185,7 @@ public class LegacyToDefaultConverter } } - @SuppressWarnings( "unchecked" ) + @SuppressWarnings ("unchecked") private boolean copyPom( Artifact artifact, ArtifactRepository targetRepository, FileTransaction transaction ) throws ArtifactConversionException { @@ -211,7 +210,7 @@ public class LegacyToDefaultConverter } // Even if the checksums for the POM are invalid we should still convert the POM - contents = FileUtils.readFileToString( file, null ); + contents = FileUtils.readFileToString( file, Charset.forName( "UTF-8" ) ); } catch ( IOException e ) { @@ -227,7 +226,7 @@ public class LegacyToDefaultConverter boolean matching = false; if ( !force && targetFile.exists() ) { - String targetContents = FileUtils.readFileToString( targetFile, null ); + String targetContents = FileUtils.readFileToString( targetFile, Charset.forName( "UTF-8" ) ); matching = targetContents.equals( contents ); } if ( force || !matching ) @@ -328,7 +327,7 @@ public class LegacyToDefaultConverter File checksumFile = new File( file.getParentFile(), fileName ); if ( checksumFile.exists() ) { - String checksum = FileUtils.readFileToString( checksumFile, null ); + String checksum = FileUtils.readFileToString( checksumFile, Charset.forName( "UTF-8" ) ); try { digester.verify( file, checksum ); @@ -466,7 +465,7 @@ public class LegacyToDefaultConverter return result; } - @SuppressWarnings( "unchecked" ) + @SuppressWarnings ("unchecked") private boolean validateMetadata( Metadata metadata, RepositoryMetadata repositoryMetadata, Artifact artifact ) { String groupIdKey; |