Skip to content

Commit ef29e69

Browse files
Polishing.
Simplify KeyMapper current property/index setup. Original Pull Request: #3689
1 parent 5cffb3c commit ef29e69

File tree

1 file changed

+3
-3
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1376,10 +1376,9 @@ public KeyMapper(String key,
13761376
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
13771377

13781378
this.pathParts = Arrays.asList(key.split("\\."));
1379-
this.currentPropertyRoot = pathParts.get(0);
1380-
this.currentIndex = 0;
13811379
this.iterator = pathParts.iterator();
1382-
this.iterator.next();
1380+
this.currentPropertyRoot = iterator.next();
1381+
this.currentIndex = 0;
13831382
}
13841383

13851384
/**
@@ -1391,6 +1390,7 @@ public KeyMapper(String key,
13911390
protected String mapPropertyName(MongoPersistentProperty property) {
13921391

13931392
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
1393+
13941394
boolean inspect = iterator.hasNext();
13951395

13961396
while (inspect) {

0 commit comments

Comments
 (0)