JAL-2485 Bug fix to filter out uniprot response header row by excluding the first row
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 21 Apr 2017 11:33:31 +0000 (12:33 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 21 Apr 2017 11:33:31 +0000 (12:33 +0100)
src/jalview/fts/service/uniprot/UniProtFTSRestClient.java

index 27bfca8..a23df4c 100644 (file)
@@ -157,14 +157,14 @@ public class UniProtFTSRestClient extends FTSRestClient
     if (foundDataRow != null && foundDataRow.length > 0)
     {
       result = new ArrayList<FTSData>();
-      String titleRow = getDataColumnsFieldsAsTabDelimitedString(uniprotRestRequest
-              .getWantedFields());
-      // System.out.println(">>>>Title row : " + titleRow);
+      boolean firstRow = true;
       for (String dataRow : foundDataRow)
       {
-        if (dataRow.equalsIgnoreCase(titleRow))
+        // The first data row is usually the header data. This should be
+        // filtered out from the rest of the data See: JAL-2485
+        if (firstRow)
         {
-          // System.out.println(">>>>>>>>>> matched!!!");
+          firstRow = false;
           continue;
         }
         // System.out.println(dataRow);