JAL-2154 make sure we wait for constructor thread to finish
[jalview.git] / 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>();