Skip to content

Commit 96b564e

Browse files
committed
Polishing.
Reformat code. See #4167. Original pull request: #4168.
1 parent 38390d3 commit 96b564e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,8 @@ public Mono<MongoCollection<Document>> createCollection(String collectionName,
663663
}
664664

665665
@Override
666-
public Mono<MongoCollection<Document>> createView(String name, Class<?> source, AggregationPipeline pipeline, @Nullable ViewOptions options) {
666+
public Mono<MongoCollection<Document>> createView(String name, Class<?> source, AggregationPipeline pipeline,
667+
@Nullable ViewOptions options) {
667668

668669
return createView(name, getCollectionName(source),
669670
queryOperations.createAggregation(Aggregation.newAggregation(source, pipeline.getOperations()), source),
@@ -1894,10 +1895,12 @@ public <T> Flux<ChangeStreamEvent<T>> changeStream(@Nullable String database, @N
18941895
publisher = filter.isEmpty() ? db.watch(Document.class) : db.watch(filter, Document.class);
18951896
}
18961897

1897-
if(options.isResumeAfter()) {
1898-
publisher = options.getResumeToken().map(BsonValue::asDocument).map(publisher::resumeAfter).orElse(publisher);
1898+
if (options.isResumeAfter()) {
1899+
publisher = options.getResumeToken().map(BsonValue::asDocument).map(publisher::resumeAfter)
1900+
.orElse(publisher);
18991901
} else if (options.isStartAfter()) {
1900-
publisher = options.getResumeToken().map(BsonValue::asDocument).map(publisher::startAfter).orElse(publisher);
1902+
publisher = options.getResumeToken().map(BsonValue::asDocument).map(publisher::startAfter)
1903+
.orElse(publisher);
19011904
}
19021905
publisher = options.getCollation().map(Collation::toMongoCollation).map(publisher::collation)
19031906
.orElse(publisher);

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/ReactiveMongoTemplateUnitTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,9 @@ void changeStreamOptionStartAftershouldApplied() {
15001500
when(changeStreamPublisher.fullDocument(any())).thenReturn(changeStreamPublisher);
15011501

15021502
BsonDocument token = new BsonDocument("token", new BsonString("id"));
1503-
template.changeStream("database", "collection", ChangeStreamOptions.builder().startAfter(token).build(), Object.class).subscribe();
1503+
template
1504+
.changeStream("database", "collection", ChangeStreamOptions.builder().startAfter(token).build(), Object.class)
1505+
.subscribe();
15041506

15051507
verify(changeStreamPublisher).startAfter(eq(token));
15061508
}
@@ -1530,6 +1532,7 @@ class Wrapper {
15301532

15311533
AutogenerateableId foo;
15321534
}
1535+
15331536
static class PersonExtended extends Person {
15341537

15351538
String lastname;

0 commit comments

Comments
 (0)