Issue #2563 modified server config parsing to allow for custom port
Replaced parsing code that assumed no colon in the server name, which prevented connecting to servers that didn't use the default XMPP port. Former-commit-id:b01e6f0c98
[formerly4f2aa49807
[formerlycea12a1a1d
] [formerlyb01e6f0c98
[formerly b995fe2036d4c0e26e25edd7f4bffd956d82921f]]] Former-commit-id:4f2aa49807
[formerlycea12a1a1d
] Former-commit-id:4f2aa49807
Former-commit-id:9102b08053
This commit is contained in:
parent
d5bde957f0
commit
5f8823446f
2 changed files with 18 additions and 2 deletions
|
@ -66,6 +66,7 @@ import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 18, 2012 mschenke Initial creation
|
||||
* Dec 19, 2013 2563 bclement added option to connect to server not in list
|
||||
* Jan 06, 2014 2563 bclement moved server text parsing to ServerInput class
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -289,7 +290,8 @@ public class LoginDialog extends Dialog {
|
|||
public void widgetSelected(SelectionEvent event) {
|
||||
loginData.setUserName(userText.getText().trim());
|
||||
loginData.setPassword(passwordText.getText().trim());
|
||||
loginData.setServer(serverText.getText().split(":")[1].trim());
|
||||
loginData.setServer(ServerInput.removeDescription(serverText
|
||||
.getText()));
|
||||
loginData.setStatus(statusCombo.getText());
|
||||
loginData.setMessage(messageText.getText().trim());
|
||||
Map<String, String> attributes = new HashMap<String, String>();
|
||||
|
|
|
@ -47,6 +47,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 18, 2013 2563 bclement Initial creation
|
||||
* Jan 06, 2014 2563 bclement added removeDescription
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -64,7 +65,6 @@ public class ServerInput implements Listener {
|
|||
|
||||
private static final int TIMEOUT = 5000; // 5 seconds
|
||||
|
||||
|
||||
/**
|
||||
* @param serverText
|
||||
*/
|
||||
|
@ -158,4 +158,18 @@ public class ServerInput implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove server description from server text field
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static String removeDescription(String text) {
|
||||
int firstColon = text.indexOf(':');
|
||||
if (firstColon >= 0) {
|
||||
text = text.substring(firstColon + 1);
|
||||
}
|
||||
return text.trim();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue