don't NPE on rare race condition while fetching MAM
This commit is contained in:
parent
afa3883089
commit
627bf18f8c
|
@ -492,6 +492,9 @@ public class Message extends AbstractEntity {
|
||||||
Message current = this;
|
Message current = this;
|
||||||
while(current.mergeable(current.next())) {
|
while(current.mergeable(current.next())) {
|
||||||
current = current.next();
|
current = current.next();
|
||||||
|
if (current == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
body.append(MERGE_SEPARATOR);
|
body.append(MERGE_SEPARATOR);
|
||||||
body.append(current.getBody().trim());
|
body.append(current.getBody().trim());
|
||||||
}
|
}
|
||||||
|
@ -507,6 +510,9 @@ public class Message extends AbstractEntity {
|
||||||
Message current = this;
|
Message current = this;
|
||||||
while(current.mergeable(current.next())) {
|
while(current.mergeable(current.next())) {
|
||||||
current = current.next();
|
current = current.next();
|
||||||
|
if (current == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
status = current.status;
|
status = current.status;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
@ -517,6 +523,9 @@ public class Message extends AbstractEntity {
|
||||||
Message current = this;
|
Message current = this;
|
||||||
while(current.mergeable(current.next())) {
|
while(current.mergeable(current.next())) {
|
||||||
current = current.next();
|
current = current.next();
|
||||||
|
if (current == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
time = current.timeSent;
|
time = current.timeSent;
|
||||||
}
|
}
|
||||||
return time;
|
return time;
|
||||||
|
|
Loading…
Reference in a new issue