From 9406e7ee2aa4f7efa26c76978a1094229d1e8dbb Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 7 Jul 2025 14:08:43 +0200 Subject: [PATCH] Add additional javadoc notes on 7.0 See gh-34709 See gh-34757 --- .../java/org/springframework/beans/factory/config/Scope.java | 2 ++ .../main/java/org/springframework/jdbc/core/JdbcTemplate.java | 4 ++-- .../jdbc/core/RowMapperResultSetExtractor.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java index 63fa1e2ce1e..6a0a4de51e2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java @@ -126,6 +126,7 @@ public interface Scope { /** * Resolve the contextual object for the given key, if any. * For example, the HttpServletRequest object for key "request". + *

Since 7.0, this interface method returns {@code null} by default. * @param key the contextual key * @return the corresponding object, or {@code null} if none found * @throws IllegalStateException if the underlying scope is not currently active @@ -145,6 +146,7 @@ public interface Scope { *

Note: This is an optional operation. It is perfectly valid to * return {@code null} in an implementation of this method if the * underlying storage mechanism has no obvious candidate for such an ID. + *

Since 7.0, this interface method returns {@code null} by default. * @return the conversation ID, or {@code null} if there is no * conversation ID for the current scope * @throws IllegalStateException if the underlying scope is not currently active diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index 11833ec090f..ea8f27d164a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -246,8 +246,8 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { * row data that will never be read by the application. *

Default is -1, indicating to use the JDBC driver's default configuration * (i.e. to not pass a specific fetch size setting on to the driver). - *

Note: As of 4.3, negative values other than -1 will get passed on to the - * driver, since, for example, MySQL supports special behavior for {@code Integer.MIN_VALUE}. + *

Note: As of 4.3, negative values other than -1 will get passed on to the driver, + * since, for example, MySQL supports special behavior for {@code Integer.MIN_VALUE}. * @see java.sql.Statement#setFetchSize */ public void setFetchSize(int fetchSize) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java index e353c850b09..fbeac97dcb9 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java @@ -91,7 +91,8 @@ public class RowMapperResultSetExtractor implements ResultSetExtractor rowMapper, int rowsExpected, int maxRows) { Assert.notNull(rowMapper, "RowMapper must not be null");