JAL-2154 make sure we wait for constructor thread to finish
authorJim Procter <jprocter@issues.jalview.org>
Sat, 13 Aug 2016 15:29:09 +0000 (16:29 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sat, 13 Aug 2016 15:29:09 +0000 (16:29 +0100)
src/jalview/gui/SequenceFetcher.java

index e259913..a9df882 100755 (executable)
@@ -202,7 +202,8 @@ public class SequenceFetcher extends JPanel implements Runnable
   }
 
   private IProgressIndicator progressIndicator;
-  private boolean _isConstructing=false;
+
+  private volatile boolean _isConstructing = false;
 
   private List<AlignFrame> newAlframes = null;
 
@@ -266,7 +267,7 @@ public class SequenceFetcher extends JPanel implements Runnable
       try { Thread.sleep(50);
       } catch (Exception q)
       {
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
       }
     }
     sf.newAlframes = new ArrayList<AlignFrame>();