File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
main/java/org/springframework/amqp/core
test/java/org/springframework/amqp/core Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2018 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.
@@ -590,9 +590,16 @@ else if (!this.contentEncoding.equals(other.contentEncoding)) {
590
590
else if (!this .contentType .equals (other .contentType )) {
591
591
return false ;
592
592
}
593
- if (!this .correlationId .equals (other .correlationId )) {
593
+
594
+ if (this .correlationId == null ) {
595
+ if (other .correlationId != null ) {
596
+ return false ;
597
+ }
598
+ }
599
+ else if (!this .correlationId .equals (other .correlationId )) {
594
600
return false ;
595
601
}
602
+
596
603
if (this .deliveryMode != other .deliveryMode ) {
597
604
return false ;
598
605
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2018 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.
26
26
/**
27
27
* @author Dave Syer
28
28
* @author Artem Yakshin
29
+ * @author Artem Bilan
29
30
*
30
31
*/
31
32
public class MessagePropertiesTests {
32
33
34
+
35
+
33
36
@ Test
34
37
public void testReplyTo () throws Exception {
35
38
MessageProperties properties = new MessageProperties ();
@@ -61,4 +64,11 @@ public void testContentLengthSet() {
61
64
assertTrue (properties .isContentLengthSet ());
62
65
}
63
66
67
+ @ Test
68
+ public void tesNoNullPointerInEquals () {
69
+ MessageProperties mp = new MessageProperties ();
70
+ MessageProperties mp2 = new MessageProperties ();
71
+ assertTrue (mp .equals (mp2 ));
72
+ }
73
+
64
74
}
You can’t perform that action at this time.
0 commit comments