From: Mateusz Warowny Date: Fri, 24 Feb 2023 15:02:31 +0000 (+0100) Subject: JAL-4135 replace stream.toString(Charset) calls with stream.toString(String) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3cc6cd558fa548219f4e12b3abbb6b88d0d20c23;p=jalview.git JAL-4135 replace stream.toString(Charset) calls with stream.toString(String) The former variant was introduced in java 10 and is not implemented in java2script. --- diff --git a/src/jalview/ws2/client/slivka/SlivkaWSClient.java b/src/jalview/ws2/client/slivka/SlivkaWSClient.java index 47e43c1..3b81ba9 100644 --- a/src/jalview/ws2/client/slivka/SlivkaWSClient.java +++ b/src/jalview/ws2/client/slivka/SlivkaWSClient.java @@ -175,7 +175,7 @@ public class SlivkaWSClient implements WebServiceClientI { ByteArrayOutputStream stream = new ByteArrayOutputStream(); f.writeTo(stream); - return stream.toString(StandardCharsets.UTF_8); + return stream.toString("UTF-8"); } } return ""; @@ -191,7 +191,7 @@ public class SlivkaWSClient implements WebServiceClientI { ByteArrayOutputStream stream = new ByteArrayOutputStream(); f.writeTo(stream); - return stream.toString(StandardCharsets.UTF_8); + return stream.toString("UTF-8"); } } return "";