summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-artifact-converter/src
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-base/archiva-artifact-converter/src')
-rw-r--r--archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverter.java6
-rw-r--r--archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java4
2 files changed, 5 insertions, 5 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 c777b32a1..83a1f4cff 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
@@ -210,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, Charset.forName( "UTF-8" ) );
+ contents = FileUtils.readFileToString( file, Charset.defaultCharset() );
}
catch ( IOException e )
{
@@ -226,7 +226,7 @@ public class LegacyToDefaultConverter
boolean matching = false;
if ( !force && targetFile.exists() )
{
- String targetContents = FileUtils.readFileToString( targetFile, Charset.forName( "UTF-8" ) );
+ String targetContents = FileUtils.readFileToString( targetFile, Charset.defaultCharset() );
matching = targetContents.equals( contents );
}
if ( force || !matching )
@@ -327,7 +327,7 @@ public class LegacyToDefaultConverter
File checksumFile = new File( file.getParentFile(), fileName );
if ( checksumFile.exists() )
{
- String checksum = FileUtils.readFileToString( checksumFile, Charset.forName( "UTF-8" ) );
+ String checksum = FileUtils.readFileToString( checksumFile, Charset.defaultCharset() );
try
{
digester.verify( file, checksum );
diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java b/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
index f6544f655..2ab82c6a9 100644
--- a/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
+++ b/archiva-modules/archiva-base/archiva-artifact-converter/src/test/java/org/apache/archiva/converter/artifact/LegacyToDefaultConverterTest.java
@@ -985,9 +985,9 @@ public class LegacyToDefaultConverterTest
throws IOException
{
String expectedContent = normalizeString(
- org.apache.commons.io.FileUtils.readFileToString( expectedPomFile, Charset.forName( "UTF-8" ) ) );
+ org.apache.commons.io.FileUtils.readFileToString( expectedPomFile, Charset.defaultCharset() ) );
String targetContent =
- normalizeString( org.apache.commons.io.FileUtils.readFileToString( pomFile, Charset.forName( "UTF-8" ) ) );
+ normalizeString( org.apache.commons.io.FileUtils.readFileToString( pomFile, Charset.defaultCharset() ) );
assertEquals( "Check file match between " + expectedPomFile + " and " + pomFile, expectedContent,
targetContent );
}