Upgrade Reactor 3.0.5, React Netty 0.6.2, SS 5.0

Fix deprecation warnings in MongoDB module
This commit is contained in:
Artem Bilan
2017-03-24 16:25:52 -04:00
parent 85f6c7af03
commit f347b2499e
4 changed files with 10 additions and 10 deletions

View File

@@ -124,8 +124,8 @@ subprojects { subproject ->
mysqlVersion = '5.1.34'
pahoMqttClientVersion = '1.0.2'
postgresVersion = '9.1-901-1.jdbc4'
reactorNettyVersion = '0.6.0.RELEASE'
reactorVersion = '3.0.4.RELEASE'
reactorNettyVersion = '0.6.2.RELEASE'
reactorVersion = '3.0.5.RELEASE'
romeToolsVersion = '1.7.0'
servletApiVersion = '3.1.0'
slf4jVersion = "1.7.21"
@@ -135,7 +135,7 @@ subprojects { subproject ->
springDataMongoVersion = '2.0.0.BUILD-SNAPSHOT'
springDataRedisVersion = '2.0.0.BUILD-SNAPSHOT'
springGemfireVersion = '2.0.0.BUILD-SNAPSHOT'
springSecurityVersion = '4.2.2.BUILD-SNAPSHOT'
springSecurityVersion = '5.0.0.BUILD-SNAPSHOT'
springSocialTwitterVersion = '2.0.0.M1'
springRetryVersion = '1.2.0.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.0.BUILD-SNAPSHOT'

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -233,7 +233,7 @@ public class ConfigurableMongoDbMessageStore extends AbstractConfigurableMongoDb
public Message<?> pollMessageFromGroup(final Object groupId) {
Assert.notNull(groupId, "'groupId' must not be null");
Sort sort = new Sort(MessageDocumentFields.LAST_MODIFIED_TIME, MessageDocumentFields.SEQUENCE);
Sort sort = Sort.by(MessageDocumentFields.LAST_MODIFIED_TIME, MessageDocumentFields.SEQUENCE);
Query query = groupIdQuery(groupId).with(sort);
MessageDocument document = mongoTemplate.findAndRemove(query, MessageDocument.class, collectionName);
Message<?> message = null;
@@ -376,7 +376,7 @@ public class ConfigurableMongoDbMessageStore extends AbstractConfigurableMongoDb
}
private static Query groupOrderQuery(Object groupId) {
Sort sort = new Sort(Sort.Direction.DESC, MessageDocumentFields.LAST_MODIFIED_TIME,
Sort sort = Sort.by(Sort.Direction.DESC, MessageDocumentFields.LAST_MODIFIED_TIME,
MessageDocumentFields.SEQUENCE);
return groupIdQuery(groupId).with(sort);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,9 +126,9 @@ public class MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessa
public Message<?> pollMessageFromGroup(Object groupId) {
Assert.notNull(groupId, "'groupId' must not be null");
Sort sort = new Sort(MessageDocumentFields.LAST_MODIFIED_TIME, MessageDocumentFields.SEQUENCE);
Sort sort = Sort.by(MessageDocumentFields.LAST_MODIFIED_TIME, MessageDocumentFields.SEQUENCE);
if (this.priorityEnabled) {
sort = new Sort(Sort.Direction.DESC, MessageDocumentFields.PRIORITY).and(sort);
sort = Sort.by(Sort.Direction.DESC, MessageDocumentFields.PRIORITY).and(sort);
}
Query query = groupIdQuery(groupId).with(sort);
MessageDocument document = this.mongoTemplate.findAndRemove(query, MessageDocument.class, this.collectionName);

View File

@@ -353,7 +353,7 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
@Override
public Message<?> pollMessageFromGroup(final Object groupId) {
Assert.notNull(groupId, "'groupId' must not be null");
Query query = whereGroupIdIs(groupId).with(new Sort(GROUP_UPDATE_TIMESTAMP_KEY, SEQUENCE));
Query query = whereGroupIdIs(groupId).with(Sort.by(GROUP_UPDATE_TIMESTAMP_KEY, SEQUENCE));
MessageWrapper messageWrapper = this.template.findAndRemove(query, MessageWrapper.class, this.collectionName);
Message<?> message = null;
if (messageWrapper != null) {