Fix Sonar vulnerabilities for varargs
* Fix smell for static `AmqpInboundGateway.attributesHolder` * Fix readOnlyHeaders in the `MessageBuilder`
This commit is contained in:
committed by
Gary Russell
parent
1d08d3bdc2
commit
315f0e711f
@@ -70,7 +70,8 @@ public class ServerWebSocketContainer extends IntegrationWebSocketContainer
|
||||
private int phase = 0;
|
||||
|
||||
public ServerWebSocketContainer(String... paths) {
|
||||
this.paths = paths;
|
||||
Assert.notEmpty(paths, "'paths' must not be empty");
|
||||
this.paths = Arrays.copyOf(paths, paths.length);
|
||||
}
|
||||
|
||||
public ServerWebSocketContainer setHandshakeHandler(HandshakeHandler handshakeHandler) {
|
||||
@@ -110,7 +111,8 @@ public class ServerWebSocketContainer extends IntegrationWebSocketContainer
|
||||
* @see WebSocketHandlerRegistration#setAllowedOrigins(String...)
|
||||
*/
|
||||
public ServerWebSocketContainer setAllowedOrigins(String... origins) {
|
||||
this.origins = origins; //NOSONAR - fully delegated
|
||||
Assert.notEmpty(origins, "'origins' must not be empty");
|
||||
this.origins = Arrays.copyOf(origins, origins.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -291,7 +293,8 @@ public class ServerWebSocketContainer extends IntegrationWebSocketContainer
|
||||
}
|
||||
|
||||
public SockJsServiceOptions setTransportHandlers(TransportHandler... transportHandlers) {
|
||||
this.transportHandlers = transportHandlers;
|
||||
Assert.notEmpty(transportHandlers, "'transportHandlers' must not be empty");
|
||||
this.transportHandlers = Arrays.copyOf(transportHandlers, transportHandlers.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user