Skip to content

Commit 9e2de95

Browse files
committed
Fix TypedPropertyPath.toDotPath() resolution for raw paths.
We now properly implement resolution and delegation for raw paths not requiring TypedPropertyPath.of(…) usage at the call site. See: #3400 Original Pull Request: #3409
1 parent b27e1b3 commit 9e2de95

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

src/main/java/org/springframework/data/core/PropertyReferences.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ static class ResolvedKPropertyReference<T, P> extends ResolvedPropertyReferenceS
315315
return property.call(obj);
316316
}
317317

318+
318319
}
319320

320321
}

src/main/java/org/springframework/data/core/TypedPropertyPath.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ default TypeInformation<P> getTypeInformation() {
147147
@Override
148148
@Nullable
149149
default PropertyPath next() {
150-
return null;
150+
return TypedPropertyPath.of(this).next();
151151
}
152152

153153
@Override
154154
default boolean hasNext() {
155-
return false;
155+
return TypedPropertyPath.of(this).hasNext();
156156
}
157157

158158
@Override

src/main/java/org/springframework/data/core/TypedPropertyPaths.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,16 @@ public PropertyReferenceWrapper(PropertyReference<T, P> property) {
353353
return property.get(obj);
354354
}
355355

356+
@Override
357+
public @Nullable PropertyPath next() {
358+
return null;
359+
}
360+
361+
@Override
362+
public boolean hasNext() {
363+
return false;
364+
}
365+
356366
@Override
357367
public TypeInformation<T> getOwningType() {
358368
return property.getOwningType();
@@ -421,6 +431,16 @@ static class ResolvedPropertyReference<T, P> extends ResolvedTypedPropertyPathSu
421431
return function.get(obj);
422432
}
423433

434+
@Override
435+
public boolean hasNext() {
436+
return false;
437+
}
438+
439+
@Override
440+
public @Nullable PropertyPath next() {
441+
return null;
442+
}
443+
424444
}
425445

426446
/**
@@ -443,6 +463,16 @@ static class ResolvedTypedPropertyPath<T, P> extends ResolvedTypedPropertyPathSu
443463
return function.get(obj);
444464
}
445465

466+
@Override
467+
public boolean hasNext() {
468+
return false;
469+
}
470+
471+
@Override
472+
public @Nullable PropertyPath next() {
473+
return null;
474+
}
475+
446476
}
447477

448478
/**
@@ -471,6 +501,15 @@ static class ResolvedKPropertyPath<T, P> extends ResolvedTypedPropertyPathSuppor
471501
return property.call(obj);
472502
}
473503

504+
@Override
505+
public boolean hasNext() {
506+
return false;
507+
}
508+
509+
@Override
510+
public @Nullable PropertyPath next() {
511+
return null;
512+
}
474513
}
475514

476515
/**

0 commit comments

Comments
 (0)