git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
903850d
)
remove any trailing '/' from the URL before validation and acceptance
author
jprocter
<jprocter@compbio.dundee.ac.uk>
Wed, 17 Aug 2011 13:44:30 +0000
(14:44 +0100)
committer
jprocter
<jprocter@compbio.dundee.ac.uk>
Wed, 17 Aug 2011 13:45:35 +0000
(14:45 +0100)
src/jalview/gui/WsPreferences.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/WsPreferences.java
b/src/jalview/gui/WsPreferences.java
index
e14b358
..
b88f27e
100644
(file)
--- a/
src/jalview/gui/WsPreferences.java
+++ b/
src/jalview/gui/WsPreferences.java
@@
-262,8
+262,14
@@
public class WsPreferences extends GWsPreferences
{
// TODO: do a better job of checking that the url is a valid discovery
// URL for web services.
- foo = new URL(urltf.getText().trim());
+ String tx = urltf.getText().trim();
+ while (tx.length()>0 && tx.lastIndexOf('/')==tx.length()-1)
+ {
+ tx = tx.substring(0, tx.length()-1);
+ }
+ foo = new URL(tx);
valid = true;
+ urltf.setText(tx);
} catch (Exception e)
{
valid = false;