From: hansonr Date: Wed, 30 Jan 2019 14:56:52 +0000 (-0600) Subject: fixes unidentified Java problem X-Git-Tag: Release_2_11_4_0~45^2~18^2~270 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1a7a229e4e1a3f6960a34543333748477022c234;p=jalview.git fixes unidentified Java problem when pasted text has white space trailing or preceding, error was indicated that "" could not be loaded. --- diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 1e6d678..f06bd97 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -417,13 +417,15 @@ public class SequenceFetcher extends JPanel implements Runnable /* * tidy inputs and check there is something to search for */ - String text = textArea.getText(); + String t0 = textArea.getText(); + String text = text.trim(); // BH 2019.01.30 if (replacePunctuation.isEnabled() && replacePunctuation.isSelected()) { text = text.replace(",", ";"); } text = text.replaceAll("(\\s|[,; ])+", ";"); - textArea.setText(text); + if (!t0.equals(text)) // BH 2019.01.30 no need to do setting if it is the same + textArea.setText(text); if (text.isEmpty()) { // todo i18n