Reduce cognitive load to understand the AmqpConnectionImpl#close() method.
1) The else block around the closed.set(true); statement in line 208 is not necessary since the corresponding if block ends with an early return statement.
2) In case the code of lines 212-249 is reached, closed is always set to true, thus there is no need to call closed.set(true); again in the close/disconnect handlers
Motivation:
Reduce cognitive load to understand the
AmqpConnectionImpl#close()
method.1) The else block around the
closed.set(true);
statement in line 208 is not necessary since the corresponding if block ends with an early return statement. 2) In case the code of lines 212-249 is reached,closed
is always set totrue
, thus there is no need to callclosed.set(true);
again in the close/disconnect handlers