Deprecate Castor support

Issue: SPR-16219
This commit is contained in:
Juergen Hoeller 2017-11-20 22:27:47 +01:00
parent 40dacd3c1c
commit 08c78554b9
5 changed files with 14 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2012 the original author or authors. * Copyright 2002-2017 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.
@ -23,7 +23,9 @@ import org.springframework.oxm.XmlMappingException;
* *
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 3.0 * @since 3.0
* @deprecated as of Spring Framework 4.3.13, due to the lack of activity on the Castor project
*/ */
@Deprecated
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class CastorMappingException extends XmlMappingException { public class CastorMappingException extends XmlMappingException {

View File

@ -74,8 +74,8 @@ import org.springframework.util.xml.StaxUtils;
* can only be used to unmarshal XML that represents that specific class. If you want to unmarshal * can only be used to unmarshal XML that represents that specific class. If you want to unmarshal
* multiple classes, you have to provide a mapping file using {@code setMappingLocations}. * multiple classes, you have to provide a mapping file using {@code setMappingLocations}.
* *
* <p>Due to limitations of Castor's API, it is required to set the encoding used for * <p>Due to limitations of Castor's API, it is required to set the encoding used for writing
* writing to output streams. It defaults to {@code UTF-8}. * to output streams. It defaults to {@code UTF-8}.
* *
* @author Arjen Poutsma * @author Arjen Poutsma
* @author Jakub Narloch * @author Jakub Narloch
@ -86,7 +86,9 @@ import org.springframework.util.xml.StaxUtils;
* @see #setTargetPackages(String[]) * @see #setTargetPackages(String[])
* @see #setMappingLocation(Resource) * @see #setMappingLocation(Resource)
* @see #setMappingLocations(Resource[]) * @see #setMappingLocations(Resource[])
* @deprecated as of Spring Framework 4.3.13, due to the lack of activity on the Castor project
*/ */
@Deprecated
public class CastorMarshaller extends AbstractMarshaller implements InitializingBean, BeanClassLoaderAware { public class CastorMarshaller extends AbstractMarshaller implements InitializingBean, BeanClassLoaderAware {
/** /**

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2013 the original author or authors. * Copyright 2002-2017 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.
@ -25,8 +25,10 @@ import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
* *
* @author Jakub Narloch * @author Jakub Narloch
* @since 3.1 * @since 3.1
* @deprecated as of Spring Framework 4.3.13, due to the lack of activity on the Castor project
*/ */
public class CastorMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser { @Deprecated
class CastorMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {
@Override @Override
protected String getBeanClassName(Element element) { protected String getBeanClassName(Element element) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2016 the original author or authors. * Copyright 2002-2017 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.
@ -27,6 +27,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
*/ */
public class OxmNamespaceHandler extends NamespaceHandlerSupport { public class OxmNamespaceHandler extends NamespaceHandlerSupport {
@SuppressWarnings("deprecation")
@Override @Override
public void init() { public void init() {
registerBeanDefinitionParser("jaxb2-marshaller", new Jaxb2MarshallerBeanDefinitionParser()); registerBeanDefinitionParser("jaxb2-marshaller", new Jaxb2MarshallerBeanDefinitionParser());

View File

@ -85,7 +85,7 @@
<xsd:annotation> <xsd:annotation>
<xsd:documentation <xsd:documentation
source="java:org.springframework.oxm.castor.CastorMarshaller"> source="java:org.springframework.oxm.castor.CastorMarshaller">
Defines a Castor Marshaller. Defines a Castor Marshaller. Deprecated as of Spring Framework 4.3.13!
</xsd:documentation> </xsd:documentation>
<xsd:appinfo> <xsd:appinfo>
<tool:annotation> <tool:annotation>