Merge branch 'jpred-fix' into bug/JAL-3807_jpred-with-slivka bug/JAL-3807_jpred-with-slivka
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 9 Jul 2021 14:57:28 +0000 (16:57 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 9 Jul 2021 14:57:28 +0000 (16:57 +0200)
1  2 
src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java

@@@ -1,17 -1,22 +1,18 @@@
  package jalview.ws.slivkaws;
  
- import java.io.IOError;
- import java.io.IOException;
- import java.rmi.ServerError;
- import java.util.List;
  import jalview.datamodel.AlignmentI;
  import jalview.datamodel.SequenceI;
 -import jalview.io.DataSourceType;
 -import jalview.io.FileFormat;
 -import jalview.io.FormatAdapter;
  import jalview.ws.api.JobId;
  import jalview.ws.api.MultipleSequenceAlignmentI;
  import jalview.ws.params.ArgumentI;
  import jalview.ws.params.InvalidArgumentException;
  import jalview.ws.params.WsParamSetI;
+ import java.io.IOError;
+ import java.io.IOException;
+ import java.rmi.ServerError;
+ import java.util.List;
 -import compbio.data.msa.Category;
  import uk.ac.dundee.compbio.slivkaclient.RemoteFile;
  import uk.ac.dundee.compbio.slivkaclient.SlivkaClient;
  import uk.ac.dundee.compbio.slivkaclient.SlivkaService;
@@@ -32,13 -37,16 +33,16 @@@ public class SlivkaMsaServiceInstance e
    @Override
    public AlignmentI getAlignmentFor(JobId jobId) throws InvalidArgumentException, ServerError, IOError
    {
-     List<RemoteFile> files;
      try
      {
-       files = client.getJobResults(jobId.getJobId());
+       List<RemoteFile> files = client.getJobResults(jobId.getJobId());
        for (RemoteFile f : files)
        {
-         return readAlignment(f);
 -        if (f.getMimeType().equals("application/clustal") 
 -            || f.getMimeType().equals("application/fasta"))
++        var aln = readAlignment(f);
++        if (aln != null)
+         {
 -          return readAlignment(f);
++          return aln;
+         }
        }
      } catch (IOException e)
      {