JAL-3454 file loading string-only (testNG) fails for PDB file
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 6 Oct 2019 18:59:56 +0000 (20:59 +0200)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 6 Oct 2019 18:59:56 +0000 (20:59 +0200)
src/jalview/io/AppletFormatAdapter.java

index 4916bb3..8c29078 100755 (executable)
@@ -158,11 +158,9 @@ public class AppletFormatAdapter
   {
 
     this.selectedFile = selectedFile;
-    if (selectedFile != null)
-    {
-      this.inFile = selectedFile.getPath();
-    }
-    this.inFile = file;
+    // BH 2019.10.06 PDB.getSequenceRecords calling this and then needs string,
+    // below
+    inFile = (selectedFile == null ? file : selectedFile.getPath());
     try
     {
       if (fileFormat.isStructureFile())
@@ -181,6 +179,8 @@ public class AppletFormatAdapter
         }
         else
         {
+          // BH: This block is executed by PDBSequenceFetcherTest
+
           // todo is mc_view parsing obsolete yet? JAL-2120
           StructureImportSettings.setShowSeqFeatures(true);
           alignFile = new mc_view.PDBfile(annotFromStructure,