Skip to content

Commit

Permalink
Fix Sonar Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Jun 16, 2022
1 parent 3b93ef8 commit e16eef6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.springframework.rabbit.stream.listener;

import java.util.Arrays;

import org.aopalliance.aop.Advice;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand Down Expand Up @@ -170,7 +172,7 @@ public boolean isAutoStartup() {
public void setAdviceChain(Advice... advices) {
Assert.notNull(advices, "'advices' cannot be null");
Assert.noNullElements(advices, "'advices' cannot have null elements");
this.adviceChain = advices;
this.adviceChain = Arrays.copyOf(adviceChain, adviceChain.length);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* A listener for message ack when using {@link AcknowledgeMode#AUTO}.
*
* @author Cao Weibo
* @author Gary Russell
* @since 2.4.6
*/
@FunctionalInterface
Expand All @@ -33,9 +34,7 @@ public interface MessageAckListener {
* @param success Whether ack succeed.
* @param deliveryTag The deliveryTag of ack.
* @param cause The cause of failed ack.
*
* @throws Exception the exception during callback.
*/
void onComplete(boolean success, long deliveryTag, @Nullable Throwable cause) throws Exception;
void onComplete(boolean success, long deliveryTag, @Nullable Throwable cause);

}

0 comments on commit e16eef6

Please sign in to comment.