From 2e8056dc2877d6499f2d614234f59ef3e62fc8b1 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 5 Apr 2019 14:10:57 +0200 Subject: [PATCH] Fix checkstyle --- .../net/sourceforge/pmd/cpd/EdgeCasesTokenizerTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pmd-go/src/test/java/net/sourceforge/pmd/cpd/EdgeCasesTokenizerTest.java b/pmd-go/src/test/java/net/sourceforge/pmd/cpd/EdgeCasesTokenizerTest.java index e3ca7d0e58..1d56e989f0 100644 --- a/pmd-go/src/test/java/net/sourceforge/pmd/cpd/EdgeCasesTokenizerTest.java +++ b/pmd-go/src/test/java/net/sourceforge/pmd/cpd/EdgeCasesTokenizerTest.java @@ -1,7 +1,11 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ package net.sourceforge.pmd.cpd; import java.io.IOException; +import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; import org.junit.Test; @@ -9,9 +13,9 @@ import org.junit.Test; public class EdgeCasesTokenizerTest { private String getSampleCode(final String filename) throws IOException { - return IOUtils.toString(GoTokenizer.class.getResourceAsStream(filename)); + return IOUtils.toString(GoTokenizer.class.getResourceAsStream(filename), StandardCharsets.UTF_8); } - + @Test public void testEscapedBackSlash() throws IOException { // See https://github.com/pmd/pmd/issues/1751