|
20 | 20 | import static org.springframework.data.util.Optionals.*;
|
21 | 21 |
|
22 | 22 | import java.io.IOException;
|
23 |
| -import java.util.*; |
| 23 | +import java.util.ArrayList; |
| 24 | +import java.util.Collection; |
| 25 | +import java.util.Collections; |
| 26 | +import java.util.HashMap; |
| 27 | +import java.util.HashSet; |
| 28 | +import java.util.Iterator; |
| 29 | +import java.util.LinkedHashSet; |
| 30 | +import java.util.List; |
| 31 | +import java.util.Map; |
24 | 32 | import java.util.Map.Entry;
|
| 33 | +import java.util.Optional; |
| 34 | +import java.util.Scanner; |
| 35 | +import java.util.Set; |
25 | 36 | import java.util.concurrent.TimeUnit;
|
26 | 37 |
|
27 | 38 | import org.bson.Document;
|
@@ -2010,7 +2021,7 @@ protected void populateIdIfNecessary(Object savedObject, Object id) {
|
2010 | 2021 | PersistentPropertyAccessor accessor = entity.getPropertyAccessor(savedObject);
|
2011 | 2022 |
|
2012 | 2023 | Optional<Object> value = accessor.getProperty(idProp);
|
2013 |
| - if(!value.isPresent()) { |
| 2024 | + if (!value.isPresent()) { |
2014 | 2025 | new ConvertingPropertyAccessor(accessor, conversionService).setProperty(idProp, Optional.of(id));
|
2015 | 2026 | }
|
2016 | 2027 | });
|
@@ -2522,7 +2533,7 @@ public FindIterable<Document> prepare(FindIterable<Document> cursor) {
|
2522 | 2533 |
|
2523 | 2534 | try {
|
2524 | 2535 | if (query.getSkip() > 0) {
|
2525 |
| - cursorToUse = cursorToUse.skip((int)query.getSkip()); |
| 2536 | + cursorToUse = cursorToUse.skip((int) query.getSkip()); |
2526 | 2537 | }
|
2527 | 2538 | if (query.getLimit() > 0) {
|
2528 | 2539 | cursorToUse = cursorToUse.limit(query.getLimit());
|
|
0 commit comments