Skip to content

Commit e9345f1

Browse files
committed
Merge branch '6.2.x'
2 parents 3632c09 + 30d793c commit e9345f1

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Diff for: spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,6 +64,7 @@ public class SqlFunction<T> extends MappingSqlQuery<T> {
6464
* @see #setSql
6565
* @see #compile
6666
*/
67+
@SuppressWarnings("removal")
6768
public SqlFunction() {
6869
setRowsExpected(1);
6970
}
@@ -74,6 +75,7 @@ public SqlFunction() {
7475
* @param ds the DataSource to obtain connections from
7576
* @param sql the SQL to execute
7677
*/
78+
@SuppressWarnings("removal")
7779
public SqlFunction(DataSource ds, String sql) {
7880
setRowsExpected(1);
7981
setDataSource(ds);
@@ -88,6 +90,7 @@ public SqlFunction(DataSource ds, String sql) {
8890
* {@code java.sql.Types} class
8991
* @see java.sql.Types
9092
*/
93+
@SuppressWarnings("removal")
9194
public SqlFunction(DataSource ds, String sql, int[] types) {
9295
setRowsExpected(1);
9396
setDataSource(ds);
@@ -105,6 +108,7 @@ public SqlFunction(DataSource ds, String sql, int[] types) {
105108
* @see #setResultType(Class)
106109
* @see java.sql.Types
107110
*/
111+
@SuppressWarnings("removal")
108112
public SqlFunction(DataSource ds, String sql, int[] types, Class<T> resultType) {
109113
setRowsExpected(1);
110114
setDataSource(ds);

Diff for: spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java

+6
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,20 @@ public SqlQuery(DataSource ds, String sql) {
8585
* Set the number of rows expected.
8686
* <p>This can be used to ensure efficient storage of results. The
8787
* default behavior is not to expect any specific number of rows.
88+
* @deprecated since 6.2.4 with no replacement since the property has never
89+
* had any affect on behavior; to be removed in 7.0
8890
*/
91+
@Deprecated(since = "6.2.4", forRemoval = true)
8992
public void setRowsExpected(int rowsExpected) {
9093
this.rowsExpected = rowsExpected;
9194
}
9295

9396
/**
9497
* Get the number of rows expected.
98+
* @deprecated since 6.2.4 with no replacement since the property has never
99+
* had any affect on behavior; to be removed in 7.0
95100
*/
101+
@Deprecated(since = "6.2.4", forRemoval = true)
96102
public int getRowsExpected() {
97103
return this.rowsExpected;
98104
}

Diff for: spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -163,6 +163,7 @@ protected Integer mapRow(ResultSet rs, int rownum) throws SQLException {
163163
}
164164

165165
@Test
166+
@SuppressWarnings("removal")
166167
void testStringQueryWithResults() throws Exception {
167168
String[] dbResults = new String[] { "alpha", "beta", "charlie" };
168169
given(resultSet.next()).willReturn(true, true, true, false);

0 commit comments

Comments
 (0)