Fix CID 1386098 (Dubious method used)

PrintStream depends on the default encoding if no encoding is given,
so set UTF-8 encoding explicitly.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-06-29 17:33:43 +02:00
parent 0686cbed87
commit 4bebf3a5a3

View File

@ -380,7 +380,7 @@ public class ScrollView {
System.out.println("Client connected");
// Setup the streams
out = new PrintStream(socket.getOutputStream(), true);
out = new PrintStream(socket.getOutputStream(), true, "UTF-8");
in =
new BufferedReader(new InputStreamReader(socket.getInputStream(),
"UTF8"));