Skip to content

Commit 4e414ba

Browse files
committed
Fix lambda in Groovy test
1 parent 6c72680 commit 4e414ba

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

driver-core/src/test/unit/com/mongodb/MongoClientSettingsSpecification.groovy

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,13 @@ class MongoClientSettingsSpecification extends Specification {
186186
.readConcern(ReadConcern.LOCAL)
187187
.applicationName('app1')
188188
.addCommandListener(commandListener)
189-
.applyToLoggerSettings(builder -> builder.maxDocumentLength(10))
190-
.applyToClusterSettings(new Block<ClusterSettings.Builder>() {
191-
@Override
192-
void apply(final ClusterSettings.Builder builder) {
193-
builder.hosts([new ServerAddress('localhost')])
194-
.requiredReplicaSetName('test')
195-
}
196-
})
189+
.applyToLoggerSettings { LoggerSettings.Builder builder ->
190+
builder.maxDocumentLength(10)
191+
}
192+
.applyToClusterSettings { ClusterSettings.Builder builder ->
193+
builder.hosts([new ServerAddress('localhost')])
194+
.requiredReplicaSetName('test')
195+
}
197196
.credential(credential)
198197
.codecRegistry(codecRegistry)
199198
.compressorList(compressorList)

0 commit comments

Comments
 (0)