]> source.dussan.org Git - tigervnc.git/commitdiff
[java] Trim any leading/trailing whitespace from servername
authorBrian P. Hinz <bphinz@users.sf.net>
Tue, 22 Oct 2019 21:48:17 +0000 (17:48 -0400)
committerBrian P. Hinz <bphinz@users.sf.net>
Tue, 22 Oct 2019 21:50:35 +0000 (17:50 -0400)
java/com/tigervnc/vncviewer/ServerDialog.java

index 99b0f7af39a4272e52e5874c8f291c6ac92b5c46..bf3a72f8a31adb2a03ba96db78acc7ccf91e7505 100644 (file)
@@ -278,6 +278,7 @@ class ServerDialog extends Dialog implements Runnable {
 
   private void handleConnect() {
     String servername = (String)serverName.getSelectedItem();
+    servername.trim();
     vncServerName.put(servername).flip();
     saveViewerParameters(null, servername);
     endDialog();