Skip to content

Commit 5062410

Browse files
committed
Fix Sonar Issues
1 parent e25600b commit 5062410

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/listener/StreamListenerContainer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.rabbit.stream.listener;
1818

19+
import java.util.Arrays;
20+
1921
import org.aopalliance.aop.Advice;
2022
import org.apache.commons.logging.Log;
2123
import org.apache.commons.logging.LogFactory;
@@ -170,7 +172,7 @@ public boolean isAutoStartup() {
170172
public void setAdviceChain(Advice... advices) {
171173
Assert.notNull(advices, "'advices' cannot be null");
172174
Assert.noNullElements(advices, "'advices' cannot have null elements");
173-
this.adviceChain = advices;
175+
this.adviceChain = Arrays.copyOf(adviceChain, adviceChain.length);
174176
}
175177

176178
@Override

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/MessageAckListener.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* A listener for message ack when using {@link AcknowledgeMode#AUTO}.
2424
*
2525
* @author Cao Weibo
26+
* @author Gary Russell
2627
* @since 2.4.6
2728
*/
2829
@FunctionalInterface
@@ -33,9 +34,7 @@ public interface MessageAckListener {
3334
* @param success Whether ack succeed.
3435
* @param deliveryTag The deliveryTag of ack.
3536
* @param cause The cause of failed ack.
36-
*
37-
* @throws Exception the exception during callback.
3837
*/
39-
void onComplete(boolean success, long deliveryTag, @Nullable Throwable cause) throws Exception;
38+
void onComplete(boolean success, long deliveryTag, @Nullable Throwable cause);
4039

4140
}

0 commit comments

Comments
 (0)