JAL-2047 trapped block that could likely cause ClassCastException
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 14 Jun 2016 11:24:40 +0000 (12:24 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 14 Jun 2016 11:24:40 +0000 (12:24 +0100)
src/jalview/fts/core/FTSDataColumnPreferences.java

index 1e38260..eb7455e 100644 (file)
@@ -68,8 +68,12 @@ public class FTSDataColumnPreferences extends JScrollPane
           FTSRestClientI ftsRestClient)
   {
     this.ftsRestClient = ftsRestClient;
+    if (source.equals(PreferenceSource.STRUCTURE_CHOOSER)
+            || source.equals(PreferenceSource.PREFERENCES))
+    {
     structSummaryColumns = ((PDBFTSRestClient) ftsRestClient)
-            .getAllDefaultDisplayedStructureDataColumns();
+              .getAllDefaultDisplayedStructureDataColumns();
+    }
     allFTSDataColumns.addAll(ftsRestClient.getAllFTSDataColumns());
 
     tbl_FTSDataColumnPrefs.setAutoCreateRowSorter(true);