Skip to content

Commit 79d22b7

Browse files
author
Matthew Sackman
committed
Merging bug 22398 into default
2 parents 65da6b3 + ceaad9a commit 79d22b7

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/com/rabbitmq/client/Connection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* ConnectionFactory factory = new ConnectionFactory();
4242
* factory.setHostName(hostName);
4343
* factory.setVirtualHost(virtualHost);
44-
* factory.setUsername(userName);
44+
* factory.setUsername(username);
4545
* factory.setPassword(password);
4646
* Connection conn = factory.newConnection();
4747
*

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class ConnectionFactory implements Cloneable {
9090
*/
9191
public static final String DEFAULT_SSL_PROTOCOL = "SSLv3";
9292

93-
private String userName = DEFAULT_USER;
93+
private String username = DEFAULT_USER;
9494
private String password = DEFAULT_PASS;
9595
private String virtualHost = DEFAULT_VHOST;
9696
private String host = DEFAULT_HOST;
@@ -144,16 +144,16 @@ public void setPort(int port) {
144144
* Retrieve the user name.
145145
* @return the AMQP user name to use when connecting to the broker
146146
*/
147-
public String getUserName() {
148-
return this.userName;
147+
public String getUsername() {
148+
return this.username;
149149
}
150150

151151
/**
152152
* Set the user name.
153-
* @param userName the AMQP user name to use when connecting to the broker
153+
* @param username the AMQP user name to use when connecting to the broker
154154
*/
155-
public void setUsername(String userName) {
156-
this.userName = userName;
155+
public void setUsername(String username) {
156+
this.username = username;
157157
}
158158

159159
/**

src/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
*
5858
* <pre>
5959
* AMQConnection conn = new AMQConnection(hostName, portNumber);
60-
* conn.open(userName, portNumber, virtualHost);
60+
* conn.open(username, portNumber, virtualHost);
6161
* </pre>
6262
*
6363
* <pre>
@@ -144,7 +144,7 @@ public void ensureIsOpen()
144144
/** Hosts retrieved from the connection.open-ok */
145145
private Address[] _knownHosts;
146146

147-
private final String _userName, _password, _virtualHost;
147+
private final String _username, _password, _virtualHost;
148148
private final int _requestedChannelMax, _requestedFrameMax, _requestedHeartbeat;
149149

150150
/** {@inheritDoc} */
@@ -188,7 +188,7 @@ public AMQConnection(ConnectionFactory factory,
188188
{
189189
checkPreconditions();
190190

191-
_userName = factory.getUserName();
191+
_username = factory.getUsername();
192192
_password = factory.getPassword();
193193
_virtualHost = factory.getVirtualHost();
194194
_requestedChannelMax = factory.getRequestedChannelMax();
@@ -258,7 +258,7 @@ public void start(boolean insist)
258258
throw AMQChannel.wrap(sse);
259259
}
260260

261-
LongString saslResponse = LongStringHelper.asLongString("\0" + _userName +
261+
LongString saslResponse = LongStringHelper.asLongString("\0" + _username +
262262
"\0" + _password);
263263
AMQImpl.Connection.StartOk startOk =
264264
new AMQImpl.Connection.StartOk(buildClientPropertiesTable(),
@@ -716,6 +716,6 @@ public void close(int closeCode,
716716
}
717717

718718
@Override public String toString() {
719-
return "amqp://" + _userName + "@" + getHost() + ":" + getPort() + _virtualHost;
719+
return "amqp://" + _username + "@" + getHost() + ":" + getPort() + _virtualHost;
720720
}
721721
}

0 commit comments

Comments
 (0)