JAL-3541 selectively merged build.gradle and gradle.properties
[jalview.git] / src / jalview / util / Platform.java
index 44d93b7..d6627c4 100644 (file)
@@ -337,9 +337,7 @@ public class Platform
 
   public static byte[] getFileBytes(File f)
   {
-    // TODO temporary doubling of ç§˜bytes and _bytes;
-    // just remove _bytes when new transpiler has been installed
-    return /** @j2sNative f && (f.\u79d8bytes || f._bytes) || */
+    return /** @j2sNative f && swingjs.JSUtil.getFileBytes$java_io_File(f) || */
     null;
   }
 
@@ -432,10 +430,8 @@ public class Platform
 
   public static String getUniqueAppletID()
   {
-    @SuppressWarnings("unused")
-    ThreadGroup g = Thread.currentThread().getThreadGroup();
     /**
-     * @j2sNative return g.\u79d8html5Applet._uniqueId;
+     * @j2sNative return swingjs.JSUtil.getApplet$()._uniqueId;
      *
      */
     return null;
@@ -456,13 +452,12 @@ public class Platform
     {
       return;
     }
-    @SuppressWarnings("unused")
-    ThreadGroup g = Thread.currentThread().getThreadGroup();
     String id = getUniqueAppletID();
     String key = "", value = "";
     /**
-     * @j2sNative var info = g.\u79d8html5Applet.__Info || {}; for (var key in info) {
-     *            if (key.indexOf(prefix) == 0) { value = "" + info[key];
+     * @j2sNative var info = swingjs.JSUtil.getApplet$().__Info || {}; for (var
+     *            key in info) { if (key.indexOf(prefix) == 0) { value = "" +
+     *            info[key];
      */
 
     System.out.println(
@@ -548,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)