@@ -75,7 +75,7 @@ public class AMQConnection extends ShutdownNotifierComponent implements Connecti
75
75
* @return a map of client properties
76
76
* @see Connection#getClientProperties
77
77
*/
78
- public static final Map <String , Object > defaultClientProperties () {
78
+ public static Map <String , Object > defaultClientProperties () {
79
79
Map <String ,Object > props = new HashMap <String , Object >();
80
80
props .put ("product" , LongStringHelper .asLongString ("RabbitMQ" ));
81
81
props .put ("version" , LongStringHelper .asLongString (ClientVersion .VERSION ));
@@ -166,7 +166,7 @@ public final void disconnectChannel(ChannelN channel) {
166
166
cm .releaseChannelNumber (channel );
167
167
}
168
168
169
- private final void ensureIsOpen ()
169
+ private void ensureIsOpen ()
170
170
throws AlreadyClosedException
171
171
{
172
172
if (!isOpen ()) {
@@ -287,7 +287,7 @@ public void start()
287
287
mainLoopThread .start ();
288
288
// after this point clear-up of MainLoop is triggered by closing the frameHandler.
289
289
290
- AMQP .Connection .Start connStart = null ;
290
+ AMQP .Connection .Start connStart ;
291
291
AMQP .Connection .Tune connTune = null ;
292
292
try {
293
293
connStart =
@@ -390,8 +390,6 @@ public void start()
390
390
391
391
// We can now respond to errors having finished tailoring the connection
392
392
this ._inConnectionNegotiation = false ;
393
-
394
- return ;
395
393
}
396
394
397
395
protected ChannelManager instantiateChannelManager (int channelMax , ThreadFactory threadFactory ) {
@@ -408,7 +406,7 @@ protected int negotiateChannelMax(int requestedChannelMax, int serverMax) {
408
406
/**
409
407
* Private API - check required preconditions and protocol invariants
410
408
*/
411
- private static final void checkPreconditions () {
409
+ private static void checkPreconditions () {
412
410
AMQCommand .checkPreconditions ();
413
411
}
414
412
@@ -451,15 +449,17 @@ public void setHeartbeat(int heartbeat) {
451
449
* Makes it possible to override thread factory that is used
452
450
* to instantiate connection network I/O loop. Only necessary
453
451
* in the environments with restricted
454
- * @param threadFactory
452
+ * @param threadFactory thread factory to use
455
453
*/
454
+ @ SuppressWarnings ("unused" )
456
455
public void setThreadFactory (ThreadFactory threadFactory ) {
457
456
this .threadFactory = threadFactory ;
458
457
}
459
458
460
459
/**
461
460
* @return Thread factory used by this connection.
462
461
*/
462
+ @ SuppressWarnings ("unused" )
463
463
public ThreadFactory getThreadFactory () {
464
464
return threadFactory ;
465
465
}
@@ -516,7 +516,7 @@ public void flush() throws IOException {
516
516
_frameHandler .flush ();
517
517
}
518
518
519
- private static final int negotiatedMaxValue (int clientValue , int serverValue ) {
519
+ private static int negotiatedMaxValue (int clientValue , int serverValue ) {
520
520
return (clientValue == 0 || serverValue == 0 ) ?
521
521
Math .max (clientValue , serverValue ) :
522
522
Math .min (clientValue , serverValue );
@@ -646,7 +646,7 @@ public boolean processControlCommand(Command c) throws IOException
646
646
// Already shutting down, so just send back a CloseOk.
647
647
try {
648
648
_channel0 .quiescingTransmit (new AMQP .Connection .CloseOk .Builder ().build ());
649
- } catch (IOException _e ) { } // ignore
649
+ } catch (IOException ignored ) { } // ignore
650
650
return true ;
651
651
} else if (method instanceof AMQP .Connection .CloseOk ) {
652
652
// It's our final "RPC". Time to shut down.
@@ -666,7 +666,7 @@ public void handleConnectionClose(Command closeCommand) {
666
666
ShutdownSignalException sse = shutdown (closeCommand .getMethod (), false , null , _inConnectionNegotiation );
667
667
try {
668
668
_channel0 .quiescingTransmit (new AMQP .Connection .CloseOk .Builder ().build ());
669
- } catch (IOException _e ) { } // ignore
669
+ } catch (IOException ignored ) { } // ignore
670
670
_brokerInitiatedShutdown = true ;
671
671
SocketCloseWait scw = new SocketCloseWait (sse );
672
672
final String name = "AMQP Connection Closing Monitor " +
@@ -793,7 +793,7 @@ public void abort(int closeCode, String closeMessage, int timeout)
793
793
{
794
794
try {
795
795
close (closeCode , closeMessage , true , null , timeout , true );
796
- } catch (IOException _e ) { } // ignore
796
+ } catch (IOException ignored ) { } // ignore
797
797
}
798
798
799
799
/**
0 commit comments