Merge branch '6.0.x'
# Conflicts: # spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java # spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java # spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java
This commit is contained in:
@@ -279,7 +279,7 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
private void processKeyedProperty(PropertyTokenHolder tokens, PropertyValue pv) {
|
private void processKeyedProperty(PropertyTokenHolder tokens, PropertyValue pv) {
|
||||||
Object propValue = getPropertyHoldingValue(tokens);
|
Object propValue = getPropertyHoldingValue(tokens);
|
||||||
PropertyHandler ph = getLocalPropertyHandler(tokens.actualName);
|
PropertyHandler ph = getLocalPropertyHandler(tokens.actualName);
|
||||||
@@ -615,7 +615,7 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
|
|||||||
return nestedPa.getPropertyValue(tokens);
|
return nestedPa.getPropertyValue(tokens);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
@Nullable
|
@Nullable
|
||||||
protected Object getPropertyValue(PropertyTokenHolder tokens) throws BeansException {
|
protected Object getPropertyValue(PropertyTokenHolder tokens) throws BeansException {
|
||||||
String propertyName = tokens.canonicalName;
|
String propertyName = tokens.canonicalName;
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public abstract class YamlProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
private Map<String, Object> asMap(Object object) {
|
private Map<String, Object> asMap(Object object) {
|
||||||
// YAML can have numbers as keys
|
// YAML can have numbers as keys
|
||||||
Map<String, Object> result = new LinkedHashMap<>();
|
Map<String, Object> result = new LinkedHashMap<>();
|
||||||
@@ -309,7 +309,7 @@ public abstract class YamlProcessor {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
private void buildFlattenedMap(Map<String, Object> result, Map<String, Object> source, @Nullable String path) {
|
private void buildFlattenedMap(Map<String, Object> result, Map<String, Object> source, @Nullable String path) {
|
||||||
source.forEach((key, value) -> {
|
source.forEach((key, value) -> {
|
||||||
if (StringUtils.hasText(path)) {
|
if (StringUtils.hasText(path)) {
|
||||||
|
|||||||
@@ -2137,7 +2137,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
|||||||
return resolveStream(true);
|
return resolveStream(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
private Stream<Object> resolveStream(boolean ordered) {
|
private Stream<Object> resolveStream(boolean ordered) {
|
||||||
DependencyDescriptor descriptorToUse = new StreamDependencyDescriptor(this.descriptor, ordered);
|
DependencyDescriptor descriptorToUse = new StreamDependencyDescriptor(this.descriptor, ordered);
|
||||||
Object result = doResolveDependency(descriptorToUse, this.beanName, null, null);
|
Object result = doResolveDependency(descriptorToUse, this.beanName, null, null);
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class SpringValidatorAdapter implements SmartValidator, jakarta.validatio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
@Override
|
@Override
|
||||||
public void validateValue(
|
public void validateValue(
|
||||||
Class<?> targetType, String fieldName, @Nullable Object value, Errors errors, Object... validationHints) {
|
Class<?> targetType, String fieldName, @Nullable Object value, Errors errors, Object... validationHints) {
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ public abstract class DataBufferUtils {
|
|||||||
* @throws DataBufferLimitException if maxByteCount is exceeded
|
* @throws DataBufferLimitException if maxByteCount is exceeded
|
||||||
* @since 5.1.11
|
* @since 5.1.11
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public static Mono<DataBuffer> join(Publisher<? extends DataBuffer> buffers, int maxByteCount) {
|
public static Mono<DataBuffer> join(Publisher<? extends DataBuffer> buffers, int maxByteCount) {
|
||||||
Assert.notNull(buffers, "'buffers' must not be null");
|
Assert.notNull(buffers, "'buffers' must not be null");
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class StandardTypeComparator implements TypeComparator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public int compare(@Nullable Object left, @Nullable Object right) throws SpelEvaluationException {
|
public int compare(@Nullable Object left, @Nullable Object right) throws SpelEvaluationException {
|
||||||
// If one is null, check if the other is
|
// If one is null, check if the other is
|
||||||
if (left == null) {
|
if (left == null) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public abstract class SqlParameterSourceUtils {
|
|||||||
* @see BeanPropertySqlParameterSource
|
* @see BeanPropertySqlParameterSource
|
||||||
* @see NamedParameterJdbcTemplate#batchUpdate(String, SqlParameterSource[])
|
* @see NamedParameterJdbcTemplate#batchUpdate(String, SqlParameterSource[])
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public static SqlParameterSource[] createBatch(Collection<?> candidates) {
|
public static SqlParameterSource[] createBatch(Collection<?> candidates) {
|
||||||
SqlParameterSource[] batch = new SqlParameterSource[candidates.size()];
|
SqlParameterSource[] batch = new SqlParameterSource[candidates.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class MessageListenerAdapter extends AbstractAdaptableMessageListener imp
|
|||||||
* @throws JMSException if thrown by JMS API methods
|
* @throws JMSException if thrown by JMS API methods
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public void onMessage(Message message, @Nullable Session session) throws JMSException {
|
public void onMessage(Message message, @Nullable Session session) throws JMSException {
|
||||||
// Check whether the delegate is a MessageListener impl itself.
|
// Check whether the delegate is a MessageListener impl itself.
|
||||||
// In that case, the adapter will simply act as a pass-through.
|
// In that case, the adapter will simply act as a pass-through.
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class MessagingMessageConverter implements MessageConverter, Initializing
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public Object fromMessage(jakarta.jms.Message message) throws JMSException, MessageConversionException {
|
public Object fromMessage(jakarta.jms.Message message) throws JMSException, MessageConversionException {
|
||||||
Map<String, Object> mappedHeaders = extractHeaders(message);
|
Map<String, Object> mappedHeaders = extractHeaders(message);
|
||||||
Object convertedObject = extractPayload(message);
|
Object convertedObject = extractPayload(message);
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ public abstract class ConnectionFactoryUtils {
|
|||||||
* @return the innermost target Connection, or the passed-in one if not wrapped
|
* @return the innermost target Connection, or the passed-in one if not wrapped
|
||||||
* @see Wrapped#unwrap()
|
* @see Wrapped#unwrap()
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public static Connection getTargetConnection(Connection con) {
|
public static Connection getTargetConnection(Connection con) {
|
||||||
Object conToUse = con;
|
Object conToUse = con;
|
||||||
while (conToUse instanceof Wrapped wrapped) {
|
while (conToUse instanceof Wrapped wrapped) {
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ abstract class NamedParameterUtils {
|
|||||||
this.parameterSource = parameterSource;
|
this.parameterSource = parameterSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public void bind(BindTarget target, String identifier, Parameter parameter) {
|
public void bind(BindTarget target, String identifier, Parameter parameter) {
|
||||||
List<BindMarker> bindMarkers = getBindMarkers(identifier);
|
List<BindMarker> bindMarkers = getBindMarkers(identifier);
|
||||||
if (bindMarkers == null) {
|
if (bindMarkers == null) {
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ public class MultipartHttpMessageWriter extends MultipartWriterSupport
|
|||||||
.concatMap(value -> encodePart(boundary, name, value, bufferFactory));
|
.concatMap(value -> encodePart(boundary, name, value, bufferFactory));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
private <T> Flux<DataBuffer> encodePart(byte[] boundary, String name, T value, DataBufferFactory factory) {
|
private <T> Flux<DataBuffer> encodePart(byte[] boundary, String name, T value, DataBufferFactory factory) {
|
||||||
MultipartHttpOutputMessage message = new MultipartHttpOutputMessage(factory);
|
MultipartHttpOutputMessage message = new MultipartHttpOutputMessage(factory);
|
||||||
HttpHeaders headers = message.getHeaders();
|
HttpHeaders headers = message.getHeaders();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -71,7 +71,7 @@ public class HttpMessageConverterExtractor<T> implements ResponseExtractor<T> {
|
|||||||
this(responseType, messageConverters, LogFactory.getLog(HttpMessageConverterExtractor.class));
|
this(responseType, messageConverters, LogFactory.getLog(HttpMessageConverterExtractor.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
HttpMessageConverterExtractor(Type responseType, List<HttpMessageConverter<?>> messageConverters, Log logger) {
|
HttpMessageConverterExtractor(Type responseType, List<HttpMessageConverter<?>> messageConverters, Log logger) {
|
||||||
Assert.notNull(responseType, "'responseType' must not be null");
|
Assert.notNull(responseType, "'responseType' must not be null");
|
||||||
Assert.notEmpty(messageConverters, "'messageConverters' must not be empty");
|
Assert.notEmpty(messageConverters, "'messageConverters' must not be empty");
|
||||||
@@ -84,7 +84,7 @@ public class HttpMessageConverterExtractor<T> implements ResponseExtractor<T> {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({"unchecked", "rawtypes", "resource"})
|
@SuppressWarnings({"rawtypes", "unchecked", "resource"})
|
||||||
public T extractData(ClientHttpResponse response) throws IOException {
|
public T extractData(ClientHttpResponse response) throws IOException {
|
||||||
IntrospectingClientHttpResponse responseWrapper = new IntrospectingClientHttpResponse(response);
|
IntrospectingClientHttpResponse responseWrapper = new IntrospectingClientHttpResponse(response);
|
||||||
if (!responseWrapper.hasMessageBody() || responseWrapper.hasEmptyMessageBody()) {
|
if (!responseWrapper.hasMessageBody() || responseWrapper.hasEmptyMessageBody()) {
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public void doWithRequest(ClientHttpRequest httpRequest) throws IOException {
|
public void doWithRequest(ClientHttpRequest httpRequest) throws IOException {
|
||||||
super.doWithRequest(httpRequest);
|
super.doWithRequest(httpRequest);
|
||||||
Object requestBody = this.requestEntity.getBody();
|
Object requestBody = this.requestEntity.getBody();
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public abstract class AbstractMessageWriterResultHandler extends HandlerResultHa
|
|||||||
* @return indicates completion or error
|
* @return indicates completion or error
|
||||||
* @since 5.0.2
|
* @since 5.0.2
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unchecked", "rawtypes", "ConstantConditions"})
|
@SuppressWarnings({"rawtypes", "unchecked", "ConstantConditions"})
|
||||||
protected Mono<Void> writeBody(@Nullable Object body, MethodParameter bodyParameter,
|
protected Mono<Void> writeBody(@Nullable Object body, MethodParameter bodyParameter,
|
||||||
@Nullable MethodParameter actualParam, ServerWebExchange exchange) {
|
@Nullable MethodParameter actualParam, ServerWebExchange exchange) {
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ final class DefaultAsyncServerResponse extends ErrorHandlingServerResponse imple
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public static AsyncServerResponse create(Object obj, @Nullable Duration timeout) {
|
public static AsyncServerResponse create(Object obj, @Nullable Duration timeout) {
|
||||||
Assert.notNull(obj, "Argument to async must not be null");
|
Assert.notNull(obj, "Argument to async must not be null");
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
|
|||||||
* @throws HttpMediaTypeNotSupportedException if no suitable message converter is found
|
* @throws HttpMediaTypeNotSupportedException if no suitable message converter is found
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage, MethodParameter parameter,
|
protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage, MethodParameter parameter,
|
||||||
Type targetType) throws IOException, HttpMediaTypeNotSupportedException, HttpMessageNotReadableException {
|
Type targetType) throws IOException, HttpMediaTypeNotSupportedException, HttpMessageNotReadableException {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user