JAL-2482 added null check
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 19 Apr 2017 11:19:45 +0000 (12:19 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 19 Apr 2017 11:19:45 +0000 (12:19 +0100)
src/jalview/ws/sifts/SiftsClient.java

index 13d33df..c69581f 100644 (file)
@@ -607,13 +607,12 @@ public class SiftsClient implements SiftsClientI
                     .getDbResNum());
           } catch (NumberFormatException nfe)
           {
-            if (pdbRefDb.getDbResNum().equals("null"))
+            if (pdbRefDb == null || pdbRefDb.getDbResNum().equals("null"))
             {
               resNum = UNASSIGNED;
               continue;
             }
-            resNum = (pdbRefDb == null) ? Integer.valueOf(residue
-                    .getDbResNum()) : Integer.valueOf(pdbRefDb
+            resNum = Integer.valueOf(pdbRefDb
                     .getDbResNum().split("[a-zA-Z]")[0]);
             continue;
           }