JAL-2312 Bug fix for repeated mapping generation from SIFTS when heuristic identifica...
[jalview.git] / src / jalview / ws / sifts / SiftsClient.java
index e85edd2..83af0e0 100644 (file)
@@ -472,8 +472,7 @@ public class SiftsClient implements SiftsClientI
 
     if (mapping.isEmpty())
     {
-      throw new SiftsException(
-              "SIFTS mapping failed - falling back on Needleman-Wunsch");
+      throw new SiftsException("SIFTS mapping failed");
     }
 
     Integer[] keys = mapping.keySet().toArray(new Integer[0]);
@@ -827,6 +826,10 @@ public class SiftsClient implements SiftsClientI
 
     if (sPojo[0].entityId != null)
     {
+      if (sPojo[0].pid < 1)
+      {
+        return null;
+      }
       for (Entity entity : entities)
       {
         if (!entity.getEntityId().equalsIgnoreCase(sPojo[0].entityId))