< prev index next >

src/jdk.jconsole/share/classes/sun/tools/jconsole/ConnectDialog.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()

*** 311,323 **** statusBar.setText(""); if (remoteRadioButton.isSelected()) { String txt = remoteTF.getText().trim(); String userName = userNameTF.getText().trim(); ! userName = userName.equals("") ? null : userName; String password = passwordTF.getText(); ! password = password.equals("") ? null : password; try { if (txt.startsWith(JConsole.ROOT_URL)) { String url = txt; jConsole.addUrl(url, userName, password, false); remoteTF.setText(JConsole.ROOT_URL); --- 311,323 ---- statusBar.setText(""); if (remoteRadioButton.isSelected()) { String txt = remoteTF.getText().trim(); String userName = userNameTF.getText().trim(); ! userName = userName.isEmpty() ? null : userName; String password = passwordTF.getText(); ! password = password.isEmpty() ? null : password; try { if (txt.startsWith(JConsole.ROOT_URL)) { String url = txt; jConsole.addUrl(url, userName, password, false); remoteTF.setText(JConsole.ROOT_URL);
< prev index next >