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 aad9bc354286..699c15f0f049 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 @@ -907,13 +907,11 @@ public T queryForObject(String sql, Object[] args, int[] argTypes, Class @Deprecated @Override - @Nullable public T queryForObject(String sql, @Nullable Object[] args, Class requiredType) throws DataAccessException { return queryForObject(sql, args, getSingleColumnRowMapper(requiredType)); } @Override - @Nullable public T queryForObject(String sql, Class requiredType, @Nullable Object... args) throws DataAccessException { return queryForObject(sql, args, getSingleColumnRowMapper(requiredType)); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java index 52cddccba745..a767b0b98f52 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java @@ -143,7 +143,6 @@ private HttpSession obtainSession() { @Override - @Nullable public Object getAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -243,7 +242,6 @@ public void registerDestructionCallback(String name, Runnable callback, int scop } @Override - @Nullable public Object resolveReference(String key) { if (REFERENCE_REQUEST.equals(key)) { return this.request; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java index f8f2b4a3beac..8545894cfff0 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java @@ -98,19 +98,16 @@ public Object getNativeRequest() { } @Override - @Nullable public Object getNativeResponse() { return getResponse(); } @Override - @Nullable public T getNativeRequest(@Nullable Class requiredType) { return WebUtils.getNativeRequest(getRequest(), requiredType); } @Override - @Nullable public T getNativeResponse(@Nullable Class requiredType) { HttpServletResponse response = getResponse(); return (response != null ? WebUtils.getNativeResponse(response, requiredType) : null); diff --git a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java index 49fc6d8eee13..8de8b0503605 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java @@ -340,7 +340,6 @@ public int getRemotePort() { @SuppressWarnings("DataFlowIssue") @Override - @Nullable public Object getAttribute(String name) { if (name.equals(WebUtils.ERROR_REQUEST_URI_ATTRIBUTE)) { return this.forwardedPrefixExtractor.getErrorRequestUri(); diff --git a/spring-web/src/main/java/org/springframework/web/multipart/MultipartFileResource.java b/spring-web/src/main/java/org/springframework/web/multipart/MultipartFileResource.java index d710062e0680..141ca407f093 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/MultipartFileResource.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/MultipartFileResource.java @@ -65,7 +65,6 @@ public long contentLength() { } @Override - @Nullable public String getFilename() { return this.multipartFile.getOriginalFilename(); } diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java index 609837234ba0..f7a3ebac9a6e 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java @@ -169,7 +169,6 @@ protected final void setMultipartParameters(Map multipartParam * lazily initializing it if necessary. * @see #initializeMultipart() */ - @SuppressWarnings("NullAway") protected Map getMultipartParameters() { if (this.multipartParameters == null) { initializeMultipart(); @@ -190,7 +189,6 @@ protected final void setMultipartParameterContentTypes(Map multi * lazily initializing it if necessary. * @see #initializeMultipart() */ - @SuppressWarnings("NullAway") protected Map getMultipartParameterContentTypes() { if (this.multipartParameterContentTypes == null) { initializeMultipart();