Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4de4c51
Prepare issue branch.
mp911de Oct 8, 2025
209ebfd
Introduce TypedPropertyPath.
mp911de Oct 8, 2025
478ed07
Remove references to Property.
mp911de Oct 27, 2025
fa1cf89
Retrofit Sort with TypedPropertyPath.
mp911de Oct 27, 2025
31cf501
Retrofit ExampleMatcher with TypedPropertyPath.
mp911de Oct 27, 2025
2b1be80
Extract lambda parsing to SamParser.
mp911de Oct 30, 2025
769cb75
Add poc for EntityLookupConfiguration replacement.
mp911de Oct 30, 2025
e926f72
Add benchmarks.
mp911de Oct 31, 2025
613952e
Documentation.
mp911de Oct 30, 2025
9e7bfa9
Add Kotlin support
mp911de Nov 1, 2025
21d5d00
Documentation
mp911de Nov 1, 2025
32c6b6b
Collection support.
mp911de Nov 2, 2025
3e3b307
Fix property path composition, introduce TCK for PropertyPath, simpli…
mp911de Nov 4, 2025
a731d55
Refine Kotlin syntax.
mp911de Nov 4, 2025
df02708
Refactor TypedPropertyPath into path and PropertyReference.
mp911de Nov 15, 2025
42ff423
Polishing.
mp911de Nov 17, 2025
3faceb0
Adapt Kotlin property reference usage through TypedPropertyPaths.
mp911de Nov 17, 2025
3cbdefd
Avoid accidental KProperty1 loading.
mp911de Nov 17, 2025
fc05f18
Avoid using internal Kotlin types in Java to avoid Javadoc failures.
mp911de Nov 17, 2025
ef595f0
Polishing.
mp911de Nov 17, 2025
b313dfe
Revise lambda caching.
mp911de Nov 18, 2025
68efb78
Refine Kotlin support.
mp911de Nov 18, 2025
62427f4
Incorporate design review feedback.
mp911de Nov 20, 2025
f383e78
Expose PropertyPathUtil.
mp911de Nov 20, 2025
b1d6892
Documentation, polishing.
mp911de Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.0-GH-3400-SNAPSHOT</version>

<name>Spring Data Core</name>
<description>Core Spring concepts underpinning every Spring Data module.</description>
Expand Down Expand Up @@ -388,6 +388,28 @@
</resources>
</build>
</profile>
<profile>
<id>jmh</id>
<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<scope>test</scope>
<version>${jmh}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</profile>
</profiles>

<repositories>
Expand Down
39 changes: 39 additions & 0 deletions src/jmh/java/org/springframework/data/BenchmarkSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data;

import java.util.concurrent.TimeUnit;

import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Warmup;

/**
* Global benchmark settings.
*
* @author Mark Paluch
*/
@Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
@Fork(value = 1, warmups = 0)
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
public abstract class BenchmarkSettings {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.core;

import org.junit.platform.commons.annotation.Testable;
import org.openjdk.jmh.annotations.Benchmark;

import org.springframework.data.BenchmarkSettings;

/**
* Benchmarks for {@link SerializableLambdaReader}.
*
* @author Mark Paluch
*/
@Testable
public class SerializableLambdaReaderBenchmarks extends BenchmarkSettings {

private static final SerializableLambdaReader reader = new SerializableLambdaReader(PropertyReference.class);

@Benchmark
public Object benchmarkMethodReference() {

PropertyReference<Person, String> methodReference = Person::firstName;
return reader.read(methodReference);
}

@Benchmark
public Object benchmarkLambda() {

PropertyReference<Person, String> methodReference = person -> person.firstName();
return reader.read(methodReference);
}

record Person(String firstName, String lastName) {

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.core;

import org.junit.platform.commons.annotation.Testable;
import org.openjdk.jmh.annotations.Benchmark;
import org.springframework.data.BenchmarkSettings;

/**
* Benchmarks for {@link TypedPropertyPath}.
*
* @author Mark Paluch
*/
@Testable
public class TypedPropertyPathBenchmarks extends BenchmarkSettings {

@Benchmark
public Object benchmarkMethodReference() {
return TypedPropertyPath.path(Person::firstName);
}

@Benchmark
public Object benchmarkComposedMethodReference() {
return TypedPropertyPath.path(Person::address).then(Address::city);
}

@Benchmark
public TypedPropertyPath<Person, String> benchmarkLambda() {
return TypedPropertyPath.path(person -> person.firstName());
}

@Benchmark
public TypedPropertyPath<Person, String> benchmarkComposedLambda() {
return TypedPropertyPath.path((Person person) -> person.address()).then(address -> address.city());
}

@Benchmark
public Object dotPath() {
return TypedPropertyPath.path(Person::firstName).toDotPath();
}

@Benchmark
public Object composedDotPath() {
return TypedPropertyPath.path(Person::address).then(Address::city).toDotPath();
}

record Person(String firstName, String lastName, Address address) {

}

record Address(String city) {

}

}
Loading
Loading