Merge branch 'use_StandardCharsets' into master

refs #2732
This commit is contained in:
Clément Fournier
2020-08-24 20:30:30 +02:00
6 changed files with 19 additions and 28 deletions

View File

@@ -15,7 +15,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -483,11 +483,7 @@ public abstract class AbstractRuleSetFactoryTest {
return new RuleSetReferenceId(null) {
@Override
public InputStream getInputStream(ResourceLoader resourceLoader) throws RuleSetNotFoundException {
try {
return new ByteArrayInputStream(ruleSetXml.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
return null;
}
return new ByteArrayInputStream(ruleSetXml.getBytes(StandardCharsets.UTF_8));
}
};
}