parent
154ef8bf10
commit
82c1c859d9
|
@ -248,16 +248,16 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe
|
|||
if (targetType == null) {
|
||||
return (T) value;
|
||||
}
|
||||
ConversionService csToUse = this.conversionService;
|
||||
if (csToUse == null) {
|
||||
ConversionService conversionServiceToUse = this.conversionService;
|
||||
if (conversionServiceToUse == null) {
|
||||
// Avoid initialization of shared DefaultConversionService if
|
||||
// no standard type conversion is needed in the first place...
|
||||
if (ClassUtils.isAssignableValue(targetType, value)) {
|
||||
return (T) value;
|
||||
}
|
||||
csToUse = DefaultConversionService.getSharedInstance();
|
||||
conversionServiceToUse = DefaultConversionService.getSharedInstance();
|
||||
}
|
||||
return csToUse.convert(value, targetType);
|
||||
return conversionServiceToUse.convert(value, targetType);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ public class SQLErrorCodesFactory {
|
|||
/**
|
||||
* Clear the cache for the specified {@link DataSource}, if registered.
|
||||
* @param dataSource the {@code DataSource} identifying the database
|
||||
* @return the corresponding {@code SQLErrorCodes} object,
|
||||
* @return the corresponding {@code SQLErrorCodes} object that got removed,
|
||||
* or {@code null} if not registered
|
||||
* @since 4.3.5
|
||||
* @see #registerDatabase(DataSource, String)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,27 +23,27 @@ import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
|||
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
|
||||
|
||||
/**
|
||||
* XStream {@link Converter} that supports all classes but throws exceptions
|
||||
* for (un)marshalling.
|
||||
* XStream {@link Converter} that supports all classes, but throws exceptions for
|
||||
* (un)marshalling.
|
||||
*
|
||||
* <p>Main purpose of this class is to
|
||||
* {@linkplain com.thoughtworks.xstream.XStream#registerConverter(Converter, int) register}
|
||||
* this converter as a catch-all converter with a
|
||||
* <p>The main purpose of this class is to
|
||||
* {@linkplain com.thoughtworks.xstream.XStream#registerConverter(com.thoughtworks.xstream.converters.Converter, int) register}
|
||||
* this converter as a catch-all last converter with a
|
||||
* {@linkplain com.thoughtworks.xstream.XStream#PRIORITY_NORMAL normal}
|
||||
* or higher priority, in addition to converters that explicitly support the domain
|
||||
* classes that should be supported. As a result, default XStream converters with lower
|
||||
* priorities and possible security vulnerabilities do not get invoked.
|
||||
* or higher priority, in addition to converters that explicitly handle the domain
|
||||
* classes that should be supported. As a result, default XStream converters with
|
||||
* lower priorities and possible security vulnerabilities do not get invoked.
|
||||
*
|
||||
* <p>For instance:</p>
|
||||
* <p>For instance:
|
||||
* <pre class="code">
|
||||
* XStreamMarshaller unmarshaller = new XStreamMarshaller();
|
||||
* unmarshaller.getXStream().registerConverter(new MyDomainClassConverter(), XStream.PRIORITY_VERY_HIGH);
|
||||
* unmarshaller.getXStream().registerConverter(new CatchAllConverter(), XStream.PRIORITY_NORMAL);
|
||||
* MyDomainClass o = unmarshaller.unmarshal(source);
|
||||
* MyDomainClass myObject = unmarshaller.unmarshal(source);
|
||||
* </pre
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 4.0
|
||||
* @since 3.2.5
|
||||
*/
|
||||
public class CatchAllConverter implements Converter {
|
||||
|
||||
|
|
|
@ -310,12 +310,12 @@ public interface RestOperations {
|
|||
|
||||
/**
|
||||
* Update a resource by PATCHing the given object to the URI template,
|
||||
* and returns the representation found in the response.
|
||||
* and return the representation found in the response.
|
||||
* <p>URI Template variables are expanded using the given URI variables, if any.
|
||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||
* add additional HTTP headers to the request.
|
||||
* @param url the URL
|
||||
* @param request the Object to be PATCHed (may be {@code null})
|
||||
* @param request the object to be PATCHed (may be {@code null})
|
||||
* @param responseType the type of the return value
|
||||
* @param uriVariables the variables to expand the template
|
||||
* @return the converted object
|
||||
|
@ -327,12 +327,12 @@ public interface RestOperations {
|
|||
|
||||
/**
|
||||
* Update a resource by PATCHing the given object to the URI template,
|
||||
* and returns the representation found in the response.
|
||||
* and return the representation found in the response.
|
||||
* <p>URI Template variables are expanded using the given map.
|
||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||
* add additional HTTP headers to the request.
|
||||
* @param url the URL
|
||||
* @param request the Object to be PATCHed (may be {@code null})
|
||||
* @param request the object to be PATCHed (may be {@code null})
|
||||
* @param responseType the type of the return value
|
||||
* @param uriVariables the variables to expand the template
|
||||
* @return the converted object
|
||||
|
@ -344,11 +344,11 @@ public interface RestOperations {
|
|||
|
||||
/**
|
||||
* Update a resource by PATCHing the given object to the URL,
|
||||
* and returns the representation found in the response.
|
||||
* and return the representation found in the response.
|
||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||
* add additional HTTP headers to the request.
|
||||
* @param url the URL
|
||||
* @param request the Object to be PATCHed (may be {@code null})
|
||||
* @param request the object to be PATCHed (may be {@code null})
|
||||
* @param responseType the type of the return value
|
||||
* @return the converted object
|
||||
* @since 4.3.5
|
||||
|
|
|
@ -150,7 +150,6 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
|||
|
||||
/**
|
||||
* Configure a {@link StompEncoder} for encoding STOMP frames
|
||||
* @param encoder the encoder
|
||||
* @since 4.3.5
|
||||
*/
|
||||
public void setEncoder(StompEncoder encoder) {
|
||||
|
@ -159,7 +158,6 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
|||
|
||||
/**
|
||||
* Configure a {@link StompDecoder} for decoding STOMP frames
|
||||
* @param decoder the decoder
|
||||
* @since 4.3.5
|
||||
*/
|
||||
public void setDecoder(StompDecoder decoder) {
|
||||
|
|
Loading…
Reference in New Issue