Skip to content

Commit 65d5471

Browse files
committed
Removed unused ServerAddress parameter in QueryBatchCursor
1 parent 4d21d92 commit 65d5471

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

driver-core/src/main/com/mongodb/operation/OperationHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static <T> QueryBatchCursor<T> createEmptyBatchCursor(final MongoNamespace names
7777
final ServerAddress serverAddress, final int batchSize) {
7878
return new QueryBatchCursor<T>(new QueryResult<T>(namespace, Collections.<T>emptyList(), 0L,
7979
serverAddress),
80-
0, batchSize, decoder, serverAddress);
80+
0, batchSize, decoder);
8181
}
8282

8383
static <T> AsyncBatchCursor<T> createEmptyAsyncBatchCursor(final MongoNamespace namespace, final Decoder<T> decoder,

driver-core/src/main/com/mongodb/operation/QueryBatchCursor.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
class QueryBatchCursor<T> implements BatchCursor<T> {
3535
private final MongoNamespace namespace;
3636
private final int limit;
37-
private final ServerAddress serverAddress;
3837
private final Decoder<T> decoder;
3938
private final ConnectionSource connectionSource;
4039
private int batchSize;
@@ -45,22 +44,16 @@ class QueryBatchCursor<T> implements BatchCursor<T> {
4544
private boolean closed;
4645

4746
QueryBatchCursor(final QueryResult<T> firstQueryResult, final int limit, final int batchSize,
48-
final Decoder<T> decoder, final ServerAddress serverAddress) {
49-
this(firstQueryResult, limit, batchSize, decoder, (ConnectionSource) null, serverAddress);
47+
final Decoder<T> decoder) {
48+
this(firstQueryResult, limit, batchSize, decoder, (ConnectionSource) null);
5049
}
5150

5251
QueryBatchCursor(final QueryResult<T> firstQueryResult, final int limit, final int batchSize,
5352
final Decoder<T> decoder, final ConnectionSource connectionSource) {
54-
this(firstQueryResult, limit, batchSize, decoder, connectionSource, connectionSource.getServerDescription().getAddress());
55-
}
56-
57-
QueryBatchCursor(final QueryResult<T> firstQueryResult, final int limit, final int batchSize,
58-
final Decoder<T> decoder, final ConnectionSource connectionSource, final ServerAddress serverAddress) {
5953
this.namespace = firstQueryResult.getNamespace();
6054
this.limit = limit;
6155
this.batchSize = batchSize;
6256
this.decoder = notNull("decoder", decoder);
63-
this.serverAddress = notNull("serverAddress", serverAddress);
6457
if (firstQueryResult.getCursor() != null) {
6558
notNull("connectionSource", connectionSource);
6659
}

0 commit comments

Comments
 (0)