Skip to content

Commit 92a2297

Browse files
Polishing.
Simplify KeyMapper current property/index setup. Original Pull Request: #3689
1 parent 2e2e076 commit 92a2297

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
@@ -1370,10 +1370,9 @@ public KeyMapper(String key,
13701370
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
13711371

13721372
this.pathParts = Arrays.asList(key.split("\\."));
1373-
this.currentPropertyRoot = pathParts.get(0);
1374-
this.currentIndex = 0;
13751373
this.iterator = pathParts.iterator();
1376-
this.iterator.next();
1374+
this.currentPropertyRoot = iterator.next();
1375+
this.currentIndex = 0;
13771376
}
13781377

13791378
/**
@@ -1385,6 +1384,7 @@ public KeyMapper(String key,
13851384
protected String mapPropertyName(MongoPersistentProperty property) {
13861385

13871386
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
1387+
13881388
boolean inspect = iterator.hasNext();
13891389

13901390
while (inspect) {

0 commit comments

Comments
 (0)