Skip to content

Commit ed8af99

Browse files
author
Simon MacMullen
committed
Tidy up, and / or reduce the size of the diff with default.
1 parent 7b0ad65 commit ed8af99

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,3 @@ promote-maven-bundle:
103103
-DtargetRepositoryId=releases \
104104
-B \
105105
)
106-

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,27 +373,34 @@ public Connection newConnection(Address[] addrs)
373373
IOException lastException = null;
374374
for (Address addr : addrs) {
375375
try {
376-
FrameHandler frameHandler = createFrameHandler(addr);
377-
AMQConnection conn = new AMQConnection(this,
376+
FrameHandler frameHandler = createFrameHandler(addr);
377+
AMQConnection conn = new AMQConnection(this,
378378
frameHandler);
379-
conn.start();
380-
return conn;
379+
conn.start();
380+
return conn;
381381
} catch (IOException e) {
382-
lastException = e;
382+
lastException = e;
383383
}
384384
}
385+
385386
if (lastException == null) {
386387
throw new IOException("failed to connect");
387388
} else {
388389
throw lastException;
389390
}
390391
}
391392

393+
/**
394+
* Create a new broker connection
395+
* @return an interface to the connection
396+
* @throws IOException if it encounters a problem
397+
*/
392398
public Connection newConnection() throws IOException {
393399
return newConnection(new Address[] {
394400
new Address(getHost(), getPort())});
395401
}
396-
402+
403+
397404
@Override public ConnectionFactory clone(){
398405
try {
399406
return (ConnectionFactory)super.clone();

src/com/rabbitmq/client/DefaultConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig
7474
// no work to do
7575
}
7676

77-
/**
77+
/**
7878
* No-op implementation of {@link Consumer#handleRecoverOk}.
7979
*/
8080
public void handleRecoverOk() {

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ public Map<String, Object> getServerProperties() {
180180
return _serverProperties;
181181
}
182182

183-
184183
/**
185184
* Construct a new connection to a broker.
186185
* @param factory the initialization parameters for a connection
@@ -311,8 +310,6 @@ public void start()
311310
Method res = _channel0.exnWrappingRpc(new AMQImpl.Connection.Open(_virtualHost,
312311
"",
313312
true)).getMethod();
314-
AMQP.Connection.OpenOk openOk = (AMQP.Connection.OpenOk) res;
315-
316313
return;
317314
}
318315

test/src/com/rabbitmq/client/test/BrokenFramesTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ public void testNoMethod() throws Exception {
8282
conn.start();
8383
} catch (IOException e) {
8484
UnexpectedFrameError unexpectedFrameError = findUnexpectedFrameError(e);
85-
if (unexpectedFrameError==null) {
86-
e.printStackTrace();
87-
conn.getCloseReason().printStackTrace();
88-
}
8985
assertNotNull(unexpectedFrameError);
9086
assertEquals(AMQP.FRAME_HEADER, unexpectedFrameError.getReceivedFrame().type);
9187
assertEquals(AMQP.FRAME_METHOD, unexpectedFrameError.getExpectedFrameType());

test/src/com/rabbitmq/client/test/functional/Recover.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,4 @@ public void testNoRedeliveryWithAutoAck()
117117
throws IOException, InterruptedException {
118118
verifyNoRedeliveryWithAutoAck(recoverSync);
119119
}
120-
121120
}

test/src/com/rabbitmq/examples/ProducerMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static void main(String[] args) {
8686
final int portNumber = optArg("portNumber", args, 1, AMQP.PROTOCOL.PORT);
8787
int rateLimit = optArg("rateLimit", args, 2, SEND_RATE);
8888
int messageCount = optArg("messageCount", args, 3, LATENCY_MESSAGE_COUNT);
89-
boolean sendCompletion = optArg("sendCompletion", args, 4, true);
89+
boolean sendCompletion = optArg("sendCompletion", args, 4, false);
9090
int commitEvery = optArg("commitEvery", args, 5, -1);
9191
boolean sendLatencyInfo = optArg("sendLatencyInfo", args, 6, true);
9292
final Connection conn = new ConnectionFactory(){{setHost(hostName); setPort(portNumber);}}.newConnection();

test/src/com/rabbitmq/examples/TestMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public void tryTopics() throws IOException {
423423
_ch1.queueDeclare(q1, false, false, false, null);
424424
_ch1.queueDeclare(q2, false, false, false, null);
425425
_ch1.queueDeclare(q3, false, false, false, null);
426-
_ch1.exchangeDeclare(x, "topic", false, true, null);
426+
_ch1.exchangeDeclare(x, "topic", false, false, null);
427427
_ch1.queueBind(q1, x, "test.#");
428428
_ch1.queueBind(q2, x, "test.test");
429429
_ch1.queueBind(q3, x, "*.test.#");

0 commit comments

Comments
 (0)