Skip to content

Commit

Permalink
Cleanup - squid:S1943 - Classes and methods that rely on the default …
Browse files Browse the repository at this point in the history
…system encoding should not be used
  • Loading branch information
Mohamed Ezzat committed Jun 28, 2016
1 parent a9c5715 commit 184a91c
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -20,6 +20,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.List;

/**
Expand Down Expand Up @@ -60,7 +61,7 @@ public interface OnLineListener {
*/
public StreamGobbler(String shell, InputStream inputStream, List<String> outputList) {
this.shell = shell;
reader = new BufferedReader(new InputStreamReader(inputStream));
reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
writer = outputList;
}

Expand All @@ -77,7 +78,7 @@ public StreamGobbler(String shell, InputStream inputStream, List<String> outputL
*/
public StreamGobbler(String shell, InputStream inputStream, OnLineListener onLineListener) {
this.shell = shell;
reader = new BufferedReader(new InputStreamReader(inputStream));
reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
listener = onLineListener;
}

Expand Down

0 comments on commit 184a91c

Please sign in to comment.