Replacing deprecated IO methods with ones that specify a charset

Standardizing with StandardCharsets.UTF_8, given that it was used in
several places of code already, and it provides compile-time checking
(as opposed to "UTF-8")
This commit is contained in:
Will Herrmann
2018-10-12 17:25:08 -05:00
parent 013ced3d7c
commit cba4e87acd
36 changed files with 161 additions and 78 deletions

View File

@ -6,6 +6,8 @@ package net.sourceforge.pmd.cpd;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@ -18,7 +20,7 @@ import net.sourceforge.pmd.testframework.AbstractTokenizerTest;
public class ScalaTokenizerTest extends AbstractTokenizerTest {
private static final String ENCODING = "UTF-8";
private static final Charset ENCODING = StandardCharsets.UTF_8;
private static final String FILENAME = "sample-LiftActor.scala";