Sonar fixes
Critical issues `o.s.i.t*`, `o.s.i.u*`. * Polishing - PR Comments.
This commit is contained in:
committed by
Artem Bilan
parent
8ce8bf9d73
commit
7790f9e550
@@ -77,6 +77,7 @@ public class MessageDocument {
|
||||
@PersistenceConstructor
|
||||
MessageDocument(Message<?> message, UUID messageId) {
|
||||
Assert.notNull(message, "'message' must not be null");
|
||||
Assert.notNull(messageId, "'message' ID header must not be null");
|
||||
this.message = message;
|
||||
this.messageId = messageId;
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
|
||||
private void addMessageDocument(MessageWrapper document) {
|
||||
UUID messageId = (UUID) document.headers.get(MessageHeaders.ID);
|
||||
Assert.notNull(messageId, "ID header must not be null");
|
||||
Query query = whereMessageIdIsAndGroupIdIs(messageId, document.get_GroupId());
|
||||
if (!this.template.exists(query, MessageWrapper.class, this.collectionName)) {
|
||||
if (document.get_Group_timestamp() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user