JAL-4135 replace stream.toString(Charset) calls with stream.toString(String)
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 24 Feb 2023 15:02:31 +0000 (16:02 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 24 Feb 2023 15:08:14 +0000 (16:08 +0100)
The former variant was introduced in java 10 and is not implemented in java2script.

src/jalview/ws2/client/slivka/SlivkaWSClient.java

index 47e43c1..3b81ba9 100644 (file)
@@ -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 "";