Skip to content

Commit 0c544a9

Browse files
committed
Polishing.
Avoiding var. Referencing issue/pr in tests. Formatting. See #2125 See #1865
1 parent 46f0309 commit 0c544a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/PartTreeJdbcQueryUnitTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,11 @@ public void createsQueryForCountProjection() throws Exception {
672672
.isEqualTo("SELECT COUNT(*) FROM " + TABLE + " WHERE " + TABLE + ".\"FIRST_NAME\" = :first_name");
673673
}
674674

675-
@Test
675+
@Test // GH-2125
676676
public void mappingMapKeyToChildShouldNotResultInDuplicateColumn() throws Exception {
677+
677678
Method method = ParentRepository.class.getMethod("findByName", String.class);
678-
var queryMethod = new JdbcQueryMethod(method, new DefaultRepositoryMetadata(ParentRepository.class),
679+
JdbcQueryMethod queryMethod = new JdbcQueryMethod(method, new DefaultRepositoryMetadata(ParentRepository.class),
679680
new SpelAwareProxyProjectionFactory(), new PropertiesBasedNamedQueries(new Properties()), mappingContext);
680681
PartTreeJdbcQuery jdbcQuery = createQuery(queryMethod);
681682
ParametrizedQuery query = jdbcQuery.createQuery(getAccessor(queryMethod, new Object[] { "John" }), returnedType);
@@ -689,6 +690,7 @@ private PartTreeJdbcQuery createQuery(JdbcQueryMethod queryMethod) {
689690
}
690691

691692
private JdbcQueryMethod getQueryMethod(String methodName, Class<?>... parameterTypes) throws Exception {
693+
692694
Method method = UserRepository.class.getMethod(methodName, parameterTypes);
693695
return new JdbcQueryMethod(method, new DefaultRepositoryMetadata(UserRepository.class),
694696
new SpelAwareProxyProjectionFactory(), new PropertiesBasedNamedQueries(new Properties()), mappingContext);

0 commit comments

Comments
 (0)