JAL-2210 use addDBRef to ensure normalisation (just in case the uniprot record is...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 3 Oct 2016 08:21:48 +0000 (09:21 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 3 Oct 2016 08:21:48 +0000 (09:21 +0100)
src/jalview/ws/dbsources/Uniprot.java

index 4c53ef9..0c2af3b 100644 (file)
@@ -267,12 +267,10 @@ public class Uniprot extends DbSourceProxyImpl
         sequence.addSequenceFeature(sf);
       }
     }
-    // we use setDBRefs to assign refs quickly.
-    sequence.setDBRefs(dbRefs.toArray(new DBRefEntry[0]));
-    // need to use ensurePrimaries to reify any refs that should become primary
-    // refs
-    DBRefUtils.ensurePrimaries(sequence); // promote any direct refs to primary
-                                          // source dbs
+    for (DBRefEntry dbr : dbRefs)
+    {
+      sequence.addDBRef(dbr);
+    }
     return sequence;
   }