8000 Merge branch 'stable' · yezijiang/rabbitmq-java-client@b145f02 · GitHub
[go: up one dir, main page]

Skip to content

Commit b145f02

Browse files
Merge branch 'stable'
2 parents 6ff390a + a603ebe commit b145f02

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public void quiescingTransmit(AMQCommand c) throws IOException {
323323
while (_blockContent) {
324324
try {
325325
_channelMutex.wait();
326-
} catch (InterruptedException e) {}
326+
} catch (InterruptedException ignored) {}
327327

328328
// This is to catch a situation when the thread wakes up during
329329
// shutdown. Currently, no command that has content is allowed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class AMQConnection extends ShutdownNotifierComponent implements Connecti
7575
* @return a map of client properties
7676
* @see Connection#getClientProperties
7777
*/
78-
public static final Map<String, Object> defaultClientProperties() {
78+
public static Map<String, Object> defaultClientProperties() {
7979
Map<String,Object> props = new HashMap<String, Object>();
8080
props.put("product", LongStringHelper.asLongString("RabbitMQ"));
8181
props.put("version", LongStringHelper.asLongString(ClientVersion.VERSION));
@@ -166,7 +166,7 @@ public final void disconnectChannel(ChannelN channel) {
166166
cm.releaseChannelNumber(channel);
167167
}
168168

169-
private final void ensureIsOpen()
169+
private void ensureIsOpen()
170170
throws AlreadyClosedException
171171
{
172172
if (!isOpen()) {
@@ -287,7 +287,7 @@ public void start()
287287
mainLoopThread.start();
288288
// after this point clear-up of MainLoop is triggered by closing the frameHandler.
289289

290-
AMQP.Connection.Start connStart = null;
290+
AMQP.Connection.Start connStart;
291291
AMQP.Connection.Tune connTune = null;
292292
try {
293293
connStart =
@@ -390,8 +390,6 @@ public void start()
390390

391391
// We can now respond to errors having finished tailoring the connection
392392
this._inConnectionNegotiation = false;
393-
394-
return;
395393
}
396394

397395
protected ChannelManager instantiateChannelManager(int channelMax, ThreadFactory threadFactory) {
@@ -408,7 +406,7 @@ protected int negotiateChannelMax(int requestedChannelMax, int serverMax) {
408406
/**
409407
* Private API - check required preconditions and protocol invariants
410408
*/
411-
private static final void checkPreconditions() {
409+
private static void checkPreconditions() {
412410
AMQCommand.checkPreconditions();
413411
}
414412

@@ -451,15 +449,17 @@ public void setHeartbeat(int heartbeat) {
451449
* Makes it possible to override thread factory that is used
452450
* to instantiate connection network I/O loop. Only necessary
453451
* in the environments with restricted
454-
* @param threadFactory
452+
* @param threadFactory thread factory to use
455453
*/
454+
@SuppressWarnings("unused")
456455
public void setThreadFactory(ThreadFactory threadFactory) {
457456
this.threadFactory = threadFactory;
458457
}
459458

460459
/**
461460
* @return Thread factory used by this connection.
462461
*/
462+
@SuppressWarnings("unused")
463463
public ThreadFactory getThreadFactory() {
464464
return threadFactory;
465465
}
@@ -516,7 +516,7 @@ public void flush() throws IOException {
516516
_frameHandler.flush();
517517
}
518518

519-
private static final int negotiatedMaxValue(int clientValue, int serverValue) {
519+
private static int negotiatedMaxValue(int clientValue, int serverValue) {
520520
return (clientValue == 0 || serverValue == 0) ?
521521
Math.max(clientValue, serverValue) :
522522
Math.min(clientValue, serverValue);
@@ -646,7 +646,7 @@ public boolean processControlCommand(Command c) throws IOException
646646
// Already shutting down, so just send back a CloseOk.
647647
try {
648648
_channel0.quiescingTransmit(new AMQP.Connection.CloseOk.Builder().build());
649-
} catch (IOException _e) { } // ignore
649+
} catch (IOException ignored) { } // ignore
650650
return true;
651651
} else if (method instanceof AMQP.Connection.CloseOk) {
652652
// It's our final "RPC". Time to shut down.
@@ -666,7 +666,7 @@ public void handleConnectionClose(Command closeCommand) {
666666
ShutdownSignalException sse = shutdown(closeCommand.getMethod(), false, null, _inConnectionNegotiation);
667667
try {
668668
_channel0.quiescingTransmit(new AMQP.Connection.CloseOk.Builder().build());
669-
} catch (IOException _e) { } // ignore
669+
} catch (IOException ignored) { } // ignore
670670
_brokerInitiatedShutdown = true;
671671
SocketCloseWait scw = new SocketCloseWait(sse);
672672
final String name = "AMQP Connection Closing Monitor " +
@@ -793,7 +793,7 @@ public void abort(int closeCode, String closeMessage, int timeout)
793793
{
794794
try {
795795
close(closeCode, closeMessage, true, null, timeout, true);
796-
} catch (IOException _e) { } // ignore
796+
} catch (IOException ignored) { } // ignore
797797
}
798798

799799
/**

0 commit comments

Comments
 (0)
0