Skip to content

Commit 8981c90

Browse files
committed
Fix new Sonar Issues
1 parent ceecf48 commit 8981c90

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

spring-rabbit-test/src/main/java/org/springframework/amqp/rabbit/test/context/SpringRabbitTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import java.lang.annotation.RetentionPolicy;
2424
import java.lang.annotation.Target;
2525

26-
import org.springframework.amqp.rabbit.junit.RabbitAvailable;
27-
2826
/**
2927
* Adds infrastructure beans to a Spring test context; do not use with Spring Boot since
3028
* it has its own auto configuration mechanism.
@@ -47,25 +45,29 @@ enum ContainerType {
4745
}
4846

4947
/**
50-
* Set the host when not using {@link RabbitAvailable}.
48+
* Set the host when not using
49+
* {@link org.springframework.amqp.rabbit.junit.RabbitAvailable}.
5150
* @return the host.
5251
*/
5352
String host() default "localhost";
5453

5554
/**
56-
* Set the port when not using {@link RabbitAvailable}.
55+
* Set the port when not using
56+
* {@link org.springframework.amqp.rabbit.junit.RabbitAvailable}.
5757
* @return the port.
5858
*/
5959
int port() default 5672;
6060

6161
/**
62-
* Set the user when not using {@link RabbitAvailable}.
62+
* Set the user when not using
63+
* {@link org.springframework.amqp.rabbit.junit.RabbitAvailable}.
6364
* @return the user.
6465
*/
6566
String user() default "guest";
6667

6768
/**
68-
* Set the password when not using {@link RabbitAvailable}.
69+
* Set the password when not using
70+
* {@link org.springframework.amqp.rabbit.junit.RabbitAvailable}.
6971
* @return the password.
7072
*/
7173
String password() default "guest";

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/PooledChannelConnectionFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void setSimplePublisherConfirms(boolean simplePublisherConfirms) {
103103
public synchronized Connection createConnection() throws AmqpException {
104104
if (this.connection == null || !this.connection.isOpen()) {
105105
Connection bareConnection = createBareConnection(); // NOSONAR - see destroy()
106-
this.connection = new ConnectionWrapper(bareConnection.getDelegate(), getCloseTimeout(),
106+
this.connection = new ConnectionWrapper(bareConnection.getDelegate(), getCloseTimeout(), // NOSONAR
107107
this.simplePublisherConfirms, this.poolConfigurer);
108108
}
109109
return this.connection;
@@ -118,7 +118,7 @@ public synchronized void destroy() {
118118
}
119119
}
120120

121-
private final static class ConnectionWrapper extends SimpleConnection {
121+
private static final class ConnectionWrapper extends SimpleConnection {
122122

123123
private final ObjectPool<Channel> channels;
124124

0 commit comments

Comments
 (0)