|
18 | 18 | import static org.springframework.data.mongodb.core.query.Criteria.*;
|
19 | 19 | import static org.springframework.data.mongodb.core.query.SerializationUtils.*;
|
20 | 20 |
|
| 21 | +import lombok.AccessLevel; |
| 22 | +import lombok.AllArgsConstructor; |
| 23 | + |
21 | 24 | import java.io.IOException;
|
22 |
| -import java.util.*; |
| 25 | +import java.util.ArrayList; |
| 26 | +import java.util.Collection; |
| 27 | +import java.util.Collections; |
| 28 | +import java.util.HashMap; |
| 29 | +import java.util.HashSet; |
| 30 | +import java.util.Iterator; |
| 31 | +import java.util.LinkedHashSet; |
| 32 | +import java.util.List; |
| 33 | +import java.util.Map; |
23 | 34 | import java.util.Map.Entry;
|
| 35 | +import java.util.Optional; |
| 36 | +import java.util.Scanner; |
| 37 | +import java.util.Set; |
24 | 38 | import java.util.concurrent.TimeUnit;
|
25 | 39 |
|
26 | 40 | import org.bson.Document;
|
@@ -2678,19 +2692,13 @@ public GeoResult<T> doWith(Document object) {
|
2678 | 2692 | * @since 1.7
|
2679 | 2693 | * @author Thomas Darimont
|
2680 | 2694 | */
|
| 2695 | + @AllArgsConstructor(access = AccessLevel.PACKAGE) |
2681 | 2696 | static class CloseableIterableCursorAdapter<T> implements CloseableIterator<T> {
|
2682 | 2697 |
|
2683 | 2698 | private volatile MongoCursor<Document> cursor;
|
2684 | 2699 | private PersistenceExceptionTranslator exceptionTranslator;
|
2685 | 2700 | private DocumentCallback<T> objectReadCallback;
|
2686 | 2701 |
|
2687 |
| - CloseableIterableCursorAdapter(MongoCursor<Document> cursor, PersistenceExceptionTranslator exceptionTranslator, |
2688 |
| - DocumentCallback<T> objectReadCallback) { |
2689 |
| - this.cursor = cursor; |
2690 |
| - this.exceptionTranslator = exceptionTranslator; |
2691 |
| - this.objectReadCallback = objectReadCallback; |
2692 |
| - } |
2693 |
| - |
2694 | 2702 | /**
|
2695 | 2703 | * Creates a new {@link CloseableIterableCursorAdapter} backed by the given {@link Cursor}.
|
2696 | 2704 | *
|
@@ -2760,5 +2768,4 @@ public void close() {
|
2760 | 2768 | public MongoDbFactory getMongoDbFactory() {
|
2761 | 2769 | return mongoDbFactory;
|
2762 | 2770 | }
|
2763 |
| - |
2764 | 2771 | }
|
0 commit comments