Avoid throws Exception where possible - Phase II
Final phase III to follow. * Polishing * Polishing
This commit is contained in:
committed by
Artem Bilan
parent
3d87ac6463
commit
b138ab80f8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
* Copyright 2014-2019 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,7 +126,7 @@ public abstract class AbstractConfigurableMongoDbMessageStore extends AbstractMe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
if (this.mongoTemplate == null) {
|
||||
if (this.mappingMongoConverter == null) {
|
||||
this.mappingMongoConverter = new MappingMongoConverter(new DefaultDbRefResolver(this.mongoDbFactory),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
* Copyright 2014-2019 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.
|
||||
@@ -88,7 +88,7 @@ public class MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
this.mongoTemplate.indexOps(this.collectionName)
|
||||
.ensureIndex(new Index(MessageDocumentFields.GROUP_ID, Sort.Direction.ASC)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -190,7 +190,7 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
public void afterPropertiesSet() {
|
||||
if (this.applicationContext != null) {
|
||||
this.converter.setApplicationContext(this.applicationContext);
|
||||
}
|
||||
@@ -353,7 +353,6 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
|
||||
Query query = Query.query(Criteria.where(GROUP_ID_KEY).exists(true));
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterable<String> groupIds = this.template.getCollection(this.collectionName)
|
||||
.distinct(GROUP_ID_KEY, query.getQueryObject(), String.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user