From: BobHanson Date: Tue, 7 Apr 2020 15:27:38 +0000 (-0500) Subject: JAL-3589 (old Platform) fix for Jalvew-JS/develop only. X-Git-Tag: Develop-2_11_2_0-d20201215~24^2~68^2~15 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=dd3701bd1390e976e2564f2def6c77ba8a2f84a8 JAL-3589 (old Platform) fix for Jalvew-JS/develop only. --- diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index ef509df..d6627c4 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -543,23 +543,22 @@ public class Platform * @param is * @param outFile * @throws IOException - * if the file cannot be created or there is a problem reading the - * input stream. + * if the file cannot be created or there is a problem + * reading the input stream. */ public static void streamToFile(InputStream is, File outFile) throws IOException { + if (isJS() && /** + * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) && + */ + true) + { + return; + } FileOutputStream fio = new FileOutputStream(outFile); try { - if (isJS() - && /** - * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) && - */ - true) - { - return; - } byte[] bb = new byte[32 * 1024]; int l; while ((l = is.read(bb)) > 0)