提交 4d97ff24 编写于 作者: C Chris Beams

Fix [dep-ann] warnings with @Deprecated

上级 6c14eaad
......@@ -90,6 +90,7 @@ public class BeanDefinitionParserDelegate {
public static final String MULTI_VALUE_ATTRIBUTE_DELIMITERS = ",; ";
/** @deprecated as of Spring 3.1 in favor of {@link #MULTI_VALUE_ATTRIBUTE_DELIMITERS} */
@Deprecated
public static final String BEAN_NAME_DELIMITERS = MULTI_VALUE_ATTRIBUTE_DELIMITERS;
/**
......@@ -343,6 +344,7 @@ public class BeanDefinitionParserDelegate {
* @deprecated in Spring 3.1 in favor of
* {@link #initDefaults(Element, BeanDefinitionParserDelegate)}
*/
@Deprecated
public void initDefaults(Element root) {
initDefaults(root, null);
}
......
......@@ -64,6 +64,7 @@ public abstract class ConversionServiceFactory {
* Create a new default GenericConversionService instance that can be safely modified.
* @deprecated in Spring 3.1 in favor of {@link DefaultConversionService#DefaultConversionService()}
*/
@Deprecated
public static GenericConversionService createDefaultConversionService() {
return new DefaultConversionService();
}
......@@ -72,6 +73,7 @@ public abstract class ConversionServiceFactory {
* Populate the given GenericConversionService instance with the set of default converters.
* @deprecated in Spring 3.1 in favor of {@link DefaultConversionService#addDefaultConverters(ConverterRegistry)}
*/
@Deprecated
public static void addDefaultConverters(GenericConversionService conversionService) {
DefaultConversionService.addDefaultConverters(conversionService);
}
......
......@@ -23,6 +23,7 @@ package org.springframework.core.enums;
* @since 1.2.6
* @deprecated as of Spring 3.0, in favor of Java 5 enums.
*/
@Deprecated
@SuppressWarnings("serial")
public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum {
......
......@@ -70,6 +70,7 @@ import org.springframework.util.Assert;
* @deprecated as of Spring 3.0, in favor of using the listener-based test context framework
* ({@link org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests})
*/
@Deprecated
public abstract class AbstractAnnotationAwareTransactionalTests extends
AbstractTransactionalDataSourceSpringContextTests {
......
......@@ -80,6 +80,7 @@ import org.springframework.util.StringUtils;
* @deprecated as of Spring 3.0, in favor of using the listener-based test context framework
* ({@link org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests})
*/
@Deprecated
public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactionalTests {
private static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml";
......
......@@ -384,6 +384,7 @@ public class StatusResultMatchers {
* Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419).
* @deprecated matching the deprecation of HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE
*/
@Deprecated
public ResultMatcher isInsufficientSpaceOnResource() {
return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE);
}
......@@ -392,6 +393,7 @@ public class StatusResultMatchers {
* Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420).
* @deprecated matching the deprecation of HttpStatus.METHOD_FAILURE
*/
@Deprecated
public ResultMatcher isMethodFailure() {
return matcher(HttpStatus.METHOD_FAILURE);
}
......@@ -400,6 +402,7 @@ public class StatusResultMatchers {
* Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421).
* @deprecated matching the deprecation of HttpStatus.DESTINATION_LOCKED
*/
@Deprecated
public ResultMatcher isDestinationLocked() {
return matcher(HttpStatus.DESTINATION_LOCKED);
}
......
......@@ -43,6 +43,7 @@ public abstract class TransactionAspectUtils {
* @deprecated as of Spring 3.1.2 in favor of
* {@link BeanFactoryAnnotationUtils#qualifiedBeanOfType(BeanFactory, Class, String)}
*/
@Deprecated
public static PlatformTransactionManager getTransactionManager(BeanFactory beanFactory, String qualifier) {
return BeanFactoryAnnotationUtils.qualifiedBeanOfType(beanFactory, PlatformTransactionManager.class, qualifier);
}
......@@ -56,6 +57,7 @@ public abstract class TransactionAspectUtils {
* @deprecated as of Spring 3.1.2 in favor of
* {@link BeanFactoryAnnotationUtils#qualifiedBeanOfType(BeanFactory, Class, String)}
*/
@Deprecated
public static PlatformTransactionManager getTransactionManager(ConfigurableListableBeanFactory bf, String qualifier) {
return BeanFactoryAnnotationUtils.qualifiedBeanOfType(bf, PlatformTransactionManager.class, qualifier);
}
......
......@@ -254,15 +254,15 @@ public enum HttpStatus {
/**
* @deprecated See <a href="http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV Draft Changes</a>
*/
INSUFFICIENT_SPACE_ON_RESOURCE(419, "Insufficient Space On Resource"),
@Deprecated INSUFFICIENT_SPACE_ON_RESOURCE(419, "Insufficient Space On Resource"),
/**
* @deprecated See <a href="http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV Draft Changes</a>
*/
METHOD_FAILURE(420, "Method Failure"),
@Deprecated METHOD_FAILURE(420, "Method Failure"),
/**
* @deprecated See <a href="http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">WebDAV Draft Changes</a>
*/
DESTINATION_LOCKED(421, "Destination Locked"),
@Deprecated DESTINATION_LOCKED(421, "Destination Locked"),
/**
* {@code 422 Unprocessable Entity}.
* @see <a href="http://tools.ietf.org/html/rfc4918#section-11.2">WebDAV</a>
......
......@@ -27,6 +27,7 @@ import org.springframework.http.converter.support.AllEncompassingFormHttpMessage
* @since 3.0.3
* @deprecated in favor of {@link AllEncompassingFormHttpMessageConverter}
*/
@Deprecated
public class XmlAwareFormHttpMessageConverter extends FormHttpMessageConverter {
public XmlAwareFormHttpMessageConverter() {
......
......@@ -142,6 +142,7 @@ import org.springframework.web.util.WebUtils;
* @deprecated in Spring 3.2 in favor of
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter RequestMappingHandlerAdapter}
*/
@Deprecated
public class AnnotationMethodHandlerAdapter extends WebContentGenerator
implements HandlerAdapter, Ordered, BeanFactoryAware {
......
......@@ -84,6 +84,7 @@ import org.springframework.web.servlet.support.RequestContextUtils;
* @deprecated as of Spring 3.2, in favor of
* {@link org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver ExceptionHandlerExceptionResolver}
*/
@Deprecated
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
// dummy method placeholder
......
......@@ -83,6 +83,7 @@ import org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMappin
* @deprecated in Spring 3.2 in favor of
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping RequestMappingHandlerMapping}
*/
@Deprecated
public class DefaultAnnotationHandlerMapping extends AbstractDetectingUrlHandlerMapping {
static final String USE_DEFAULT_SUFFIX_PATTERN = DefaultAnnotationHandlerMapping.class.getName() + ".useDefaultSuffixPattern";
......
......@@ -35,6 +35,7 @@ import org.springframework.web.util.WebUtils;
* @deprecated in 3.2 together with {@link DefaultAnnotationHandlerMapping},
* {@link AnnotationMethodHandlerAdapter}, and {@link AnnotationMethodHandlerExceptionResolver}.
*/
@Deprecated
abstract class ServletAnnotationMappingUtils {
/**
......
......@@ -132,6 +132,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setFavorPathExtension(boolean favorPathExtension) {
this.cnManagerFactoryBean.setFavorParameter(favorPathExtension);
}
......@@ -142,6 +143,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setUseJaf(boolean useJaf) {
this.cnManagerFactoryBean.setUseJaf(useJaf);
}
......@@ -155,6 +157,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setFavorParameter(boolean favorParameter) {
this.cnManagerFactoryBean.setFavorParameter(favorParameter);
}
......@@ -165,6 +168,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setParameterName(String parameterName) {
this.cnManagerFactoryBean.setParameterName(parameterName);
}
......@@ -177,6 +181,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setIgnoreAcceptHeader(boolean ignoreAcceptHeader) {
this.cnManagerFactoryBean.setIgnoreAcceptHeader(ignoreAcceptHeader);
}
......@@ -188,6 +193,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setMediaTypes(Map<String, String> mediaTypes) {
if (mediaTypes != null) {
this.cnManagerFactoryBean.getMediaTypes().putAll(mediaTypes);
......@@ -201,6 +207,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
*
* @deprecated use {@link #setContentNegotiationManager(ContentNegotiationManager)}
*/
@Deprecated
public void setDefaultContentType(MediaType defaultContentType) {
this.cnManagerFactoryBean.setDefaultContentType(defaultContentType);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册