Skip to content

Commit

Permalink
use standard charsets
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Coles committed Apr 19, 2021
1 parent 2354cd3 commit 3cc19fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -487,7 +488,7 @@ public Optional<Reader> createHistoryReader() {
if (this.historyInputLocation.exists()
&& (this.historyInputLocation.length() > 0)) {
return Optional.ofNullable(new InputStreamReader(new FileInputStream(
this.historyInputLocation), "UTF-8"));
this.historyInputLocation), StandardCharsets.UTF_8));
}
return Optional.empty();
} catch (final IOException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;

import org.pitest.util.Unchecked;

Expand All @@ -23,7 +24,7 @@ public PrintWriter create() {
try {
if (this.writer == null) {
this.writer = new PrintWriter(new OutputStreamWriter(
new FileOutputStream(this.file), "UTF-8"));
new FileOutputStream(this.file), StandardCharsets.UTF_8));
}

return this.writer;
Expand Down

0 comments on commit 3cc19fb

Please sign in to comment.