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() {
106
106
@ Deprecated
107
107
@ Nullable
108
108
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
+ }
110
115
}
111
116
112
117
/**
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2019-2020 the original author or authors.
2
+ * Copyright 2019-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
64
64
@ RabbitAvailable
65
65
public class PublisherCallbackChannelTests {
66
66
67
+ @ SuppressWarnings ("deprecation" )
68
+ @ Test
69
+ void correlationData () {
70
+ CorrelationData cd = new CorrelationData ();
71
+ assertThat (cd .getReturnedMessage ()).isNull ();
72
+ }
73
+
67
74
@ Test
68
75
void shutdownWhileCreate () throws IOException , TimeoutException {
69
76
Channel delegate = mock (Channel .class );
You can’t perform that action at this time.
0 commit comments