Skip to content

Commit 323ec3f

Browse files
Polishing.
Simplify KeyMapper current property/index setup. Original Pull Request: #3689
1 parent e480ceb commit 323ec3f

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

12841284
this.pathParts = Arrays.asList(key.split("\\."));
1285-
this.currentPropertyRoot = pathParts.get(0);
1286-
this.currentIndex = 0;
12871285
this.iterator = pathParts.iterator();
1288-
this.iterator.next();
1286+
this.currentPropertyRoot = iterator.next();
1287+
this.currentIndex = 0;
12891288
}
12901289

12911290
/**
@@ -1297,6 +1296,7 @@ public KeyMapper(String key,
12971296
protected String mapPropertyName(MongoPersistentProperty property) {
12981297

12991298
StringBuilder mappedName = new StringBuilder(PropertyToFieldNameConverter.INSTANCE.convert(property));
1299+
13001300
boolean inspect = iterator.hasNext();
13011301

13021302
while (inspect) {

0 commit comments

Comments
 (0)