From a42c41540472aacb92ce6dbc72e318a75a12b9db Mon Sep 17 00:00:00 2001 From: Me Car Date: Tue, 5 Jan 2016 02:16:17 +0900 Subject: [PATCH] Rename connection.password to connection.adminpassword. --- Mage.Common/src/mage/remote/Connection.java | 10 +++++----- Mage.Common/src/mage/remote/SessionImpl.java | 4 ++-- .../main/java/mage/server/console/ConnectDialog.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Mage.Common/src/mage/remote/Connection.java b/Mage.Common/src/mage/remote/Connection.java index 0c4e86c827..ddb78d413c 100644 --- a/Mage.Common/src/mage/remote/Connection.java +++ b/Mage.Common/src/mage/remote/Connection.java @@ -44,7 +44,7 @@ public class Connection { private String host; private int port; private String username; - private String password; + private String adminPassword; private ProxyType proxyType; private String proxyHost; private int proxyPort; @@ -164,12 +164,12 @@ public class Connection { this.username = username; } - public String getPassword() { - return password; + public String getAdminPassword() { + return adminPassword; } - public void setPassword(String password) { - this.password = password; + public void setAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; } public String getProxyHost() { diff --git a/Mage.Common/src/mage/remote/SessionImpl.java b/Mage.Common/src/mage/remote/SessionImpl.java index 3b4036d4c2..5045023cea 100644 --- a/Mage.Common/src/mage/remote/SessionImpl.java +++ b/Mage.Common/src/mage/remote/SessionImpl.java @@ -278,14 +278,14 @@ public class SessionImpl implements Session { this.sessionId = callbackClient.getSessionId(); boolean registerResult; - if (connection.getPassword() == null) { + if (connection.getAdminPassword() == null) { // for backward compatibility. don't remove twice call - first one does nothing but for version checking registerResult = server.registerClient(connection.getUsername(), sessionId, client.getVersion()); if (registerResult) { server.setUserData(connection.getUsername(), sessionId, connection.getUserData()); } } else { - registerResult = server.registerAdmin(connection.getPassword(), sessionId, client.getVersion()); + registerResult = server.registerAdmin(connection.getAdminPassword(), sessionId, client.getVersion()); } if (registerResult) { sessionState = SessionState.CONNECTED; diff --git a/Mage.Server.Console/src/main/java/mage/server/console/ConnectDialog.java b/Mage.Server.Console/src/main/java/mage/server/console/ConnectDialog.java index 127efc1b71..6a4b6e8620 100644 --- a/Mage.Server.Console/src/main/java/mage/server/console/ConnectDialog.java +++ b/Mage.Server.Console/src/main/java/mage/server/console/ConnectDialog.java @@ -413,7 +413,7 @@ public class ConnectDialog extends JDialog { connection = new Connection(); connection.setHost(this.txtServer.getText()); connection.setPort(Integer.valueOf(this.txtPort.getText())); - connection.setPassword(new String(txtPassword.getPassword())); + connection.setAdminPassword(new String(txtPassword.getPassword())); connection.setUsername("Admin"); connection.setProxyType((ProxyType) this.cbProxyType.getSelectedItem()); if (!this.cbProxyType.getSelectedItem().equals(ProxyType.NONE)) {