File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
main/java/org/springframework/amqp/rabbit/connection
test/java/org/springframework/amqp/rabbit/connection Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,12 @@ public SettableListenableFuture<Confirm> getFuture() {
106106 @ Deprecated
107107 @ Nullable
108108 public Message getReturnedMessage () {
109- return this .returnedMessage .getMessage ();
109+ if (this .returnedMessage == null ) {
110+ return null ;
111+ }
112+ else {
113+ return this .returnedMessage .getMessage ();
114+ }
110115 }
111116
112117 /**
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2019-2020 the original author or authors.
2+ * Copyright 2019-2021 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
6464@ RabbitAvailable
6565public class PublisherCallbackChannelTests {
6666
67+ @ SuppressWarnings ("deprecation" )
68+ @ Test
69+ void correlationData () {
70+ CorrelationData cd = new CorrelationData ();
71+ assertThat (cd .getReturnedMessage ()).isNull ();
72+ }
73+
6774 @ Test
6875 void shutdownWhileCreate () throws IOException , TimeoutException {
6976 Channel delegate = mock (Channel .class );
You can’t perform that action at this time.
0 commit comments