Merge branch 'develop' into trialMerge
[jalview.git] / src / jalview / ws / dbsources / Uniprot.java
index d1da9de..6f5f033 100644 (file)
@@ -180,16 +180,12 @@ public class Uniprot extends DbSourceProxyImpl
   SequenceI uniprotEntryToSequence(Entry entry)
   {
     String id = getUniprotEntryId(entry);
-    String seqString = entry.getSequence().getValue();
-
     /*
-     * for backwards compatibility with Castor processing,
-     * remove any internal spaces
+     * Sequence should not include any whitespace, but JAXB leaves these in
      */
-    if (seqString.indexOf(' ') > -1)
-    {
-      seqString = seqString.replace(" ", "");
-    }
+    String seqString = entry.getSequence().getValue().replaceAll("\\s*",
+            "");
+
     SequenceI sequence = new Sequence(id,
             seqString);
     sequence.setDescription(getUniprotEntryDescription(entry));