Commit Graph

65 Commits

Author SHA1 Message Date
Sam Brannen 8bb29750bf Deleted unused resourceLoader field in Jaxb2Marshaller 2013-10-31 13:48:27 +01:00
Juergen Hoeller 5e88fe5842 Clarified Spring 4.0's dependency on JAX-WS 2.1+ / JAXB 2.1+ in javadoc 2013-09-25 12:54:25 +02:00
Juergen Hoeller 7b63745e04 Ignore setAliasesByType tests since they fail on OpenJDK 8 b108
Probably an XStream-internal problem: fails to marshal the flightNumber element.
2013-09-25 12:34:53 +02:00
Juergen Hoeller d202573e1a Revised spring-oxm for 4.0
Added "target-package" to the jibx-marshaller element. Also fixed "context-path" and "binding-name" to follow Spring's usual attribute naming convention.

Issue: SPR-10882
2013-09-02 22:02:11 +02:00
Juergen Hoeller b25876fd0f Polishing 2013-09-02 22:01:57 +02:00
Juergen Hoeller 3d462b6dd9 Added missing spring.schemas entries for 4.0 xsds
Also fixing an old XmlBeanFactory test that relies on "ref local" which is gone in the 4.0 xsd now, redeclaring the affected file to an older xsd version.
2013-08-22 19:36:53 +02:00
Arjen Poutsma 37861c3f90 Support 'empty' StreamSource in Jaxb2Marshaller
Added support for StreamSources that do not have a InputStream or
Reader, but do have a System ID.

Issue: 10828
2013-08-13 18:14:45 -04:00
Arjen Poutsma d9bfac393b Added reference to CatchAllConverter
Added reference to CatchAllConverter in both javadoc and reference docs.

Issue: SPR-10821
2013-08-12 12:26:34 +02:00
Arjen Poutsma 5311e84c64 Added XStream CatchAllConverter
Added XStream CatchAllConverter that supports all classes, but throws
exceptions for (un)marshalling.

Main purpose of this class is to register this converter as a catchall
last converter with a 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.
2013-08-09 08:43:29 -04:00
Juergen Hoeller b27e240fdb Consistent use of varargs, consistent template method order 2013-08-09 11:43:20 +02:00
Juergen Hoeller 92e3c52a48 XStreamMarshaller exposes public marshal methods with DataHolder parameter
Also splitted buildXStream into constructXStream and configureXStream now.

Issue: SPR-10421
2013-08-09 11:41:52 +02:00
Juergen Hoeller c3032349b1 Introduced "mapperWrappers" bean property
Issue: SPR-10421
2013-08-05 23:50:44 +02:00
Juergen Hoeller 3cd2eb83c5 Exposed all of XStream 1.4's configurable strategies as XStreamMarshaller bean properties
Issue: SPR-10421
2013-08-05 22:13:04 +02:00
Juergen Hoeller 58bfd1ae9a Upgraded to XStream 1.4+; reworked XStream construction
Also introducing a "mapper" bean property and applying the stream driver and the class loader to the native XStream delegate now.

Issue: SPR-10421
2013-08-05 18:04:43 +02:00
Biju Kunjummen 4f871d4448 Fix Jaxb2TypeScanner to scan for @XmlRegistry
Update ClassPathJaxb2TypeScanner to scan for @XmlRegistry classes.

Prior to this commit explicitly configured @XmlRegistry annotated classes
were not registered with the JAXBContext when using the 'packagesToScan'
property of the Jaxb2Unmarshaller.

Issue: SPR-10714
2013-07-29 11:21:24 -07:00
Rob Winch b255045541 Enable Jibx binding with TestGroup.CUSTOM_COMPILATION
Previously the Jibx binding was commented out which caused failures when
using the TestGroup.CUSTOM_COMPILATION

Now the Jibx bindings are enabled when the CUSTOM_COMPILATION is enabled.

Issue: SPR-10558
2013-07-24 10:17:09 -05:00
Rob Winch f7c0795c1a Add TestGroup.CUSTOM_COMPILATION
Previously building with JDK > 1.8 b88 caused test failures due to errors
with custom compilers like Jibx and Jasper reports.

This commit adds a new TestGroup named CUSTOM_COMPILATION that allows the
CI server to continue to run these tests but allow committers to ignore
these tests.
2013-07-24 09:29:17 -05:00
Arjen Poutsma 4da7e304b8 Additional docs about security vulnerabilities with XStream. 2013-07-24 10:24:13 -04:00
Juergen Hoeller 01a71ef5ef Polishing 2013-07-24 13:40:15 +02:00
Juergen Hoeller bb95a63eda OpenJDK 8 build 99: Jibx compiler fails - ignoring Jibx tests for the time being 2013-07-24 13:39:24 +02:00
Arjen Poutsma 2c030d4dcf Added 'processExternalEntities' to JAXB2Marshaller
Added 'processExternalEntities' property to the JAXB2Marshaller, which
indicates whether external XML entities are processed when
unmarshalling.

Default is false, meaning that external entities are not resolved.
Processing of external entities will only be enabled/disabled when the
Source} passed to #unmarshal(Source) is a SAXSource or StreamSource. It
has no effect for DOMSource or StAXSource instances.
2013-07-19 11:02:20 -04:00
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 0fc5a5d912 Introduced 4.0 versions of all XML configuration schemas
Removed spring-beans.dtd (the 1.x variant) and spring-oxm-1.5.xsd (pre-Spring-Framework variant), in order to raise the backwards compatibility limit a little bit at least. We'll keep supporting the 2.0 and 2.5 xsd versions for the time being, as well as spring-beans-2.0.dtd.

Removed the ref 'local' attribute in spring-beans-4.0.xsd since 'local' lost its differentiating role to a regular bean ref back in the 3.1 days when we started allowing for the same bean id to reappear in a different beans section of the same configuration file (with a different profile).

Issue: SPR-10437
2013-05-07 18:11:51 +02:00
Juergen Hoeller 255eab5bed Jaxb2Marshaller doesn't need to depend on ResourceLoaderAware
Issue: SPR-10512
2013-05-03 17:23:24 +02:00
Juergen Hoeller 283b3ee44b Fixed Jaxb2Marshaller's partial unmarshalling feature to consistently apply to all sources
Issue: SPR-10282
2013-03-19 10:51:30 +01:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Juergen Hoeller de069d06d8 Made "getJaxbContext()" method public
Issue: SPR-10282
2013-02-27 00:26:27 +01:00
Juergen Hoeller 23925edc95 Added "mappedClass" property to Jaxb2Marshaller, introducing support for partial unmarshalling
Issue: SPR-10282
2013-02-11 21:52:03 +01:00
Juergen Hoeller 9e9cdf5f13 Removed unused XStreamUtils class; direct access to the xstream field in XStreamMarshaller 2013-02-10 21:10:00 +01:00
Juergen Hoeller 6a2ace739f Added "entityResolver", "classDescriptorResolver", "doctypes" and further properties to CastorMarshaller
Also deprecated CastorMarshaller's "object" property in favor of "rootObject".

Issue: SPR-8470
2013-02-10 21:09:00 +01:00
Phillip Webb f464a45ba4 Polish formatting
Minor formatting polish across that codebase. Primarily fixing
whitespace issues.
2013-02-04 10:35:25 -08:00
Phillip Webb 6a1e841952 Fix unused type compiler warnings 2013-01-25 14:35:07 -08:00
Chris Beams d40c8cfc58 Fix broken Castor URLs in ref docs and mapping XML
Issue: SPR-10189
2013-01-21 11:21:44 +01:00
Chris Beams 830d73b4a7 Eliminate EBR dependencies and repository config
Swap the following EBR-specific dependencies for their equivalents at
Maven Central:

 - atinject-tck
 - jaxb
 - xmlbeans

Remove the /ebr-maven-external repository from the build script entirely
such that all dependencies are now resolved against a single repository:

    http://repo.springsource.org/libs-release
2013-01-03 19:19:25 +01:00
Phillip Webb 6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams 6f0c7eb8c1 Update test source and target JDK compatibility
"test" source and target compatibility has been upgraded to 1.7 except
where noted, allowing us to use 1.7 language features such as
diamond-style (<>) generics declarations, automatic resource management
and multi-catch. More importantly, we will be able to upgrade to 1.8
once it is available in order to make use of lambda expressions, etc in
our test cases.

IDE configurations must be relaxed to allow 1.7 across the board, as
neither Eclipse nor IDEA are clever enough to allow for different
language levels across production and test resources. See [1] for a
feature request on that front.

spring-oxm is a special case here, and has been pinned at 1.6
compatibility even for its test sources in order to avoid a class
verification error that JibX throws when encountering 1.7-level
bytecode [2].

Likewise with spring-orm, toplink encounters a similar class
verification error, so has been pinned to 1.6 for the time being.
When we remove the (already deprecated since 3.2) Toplink support
we can restore compatibility to 1.7.

[1]: http://youtrack.jetbrains.com/issue/IDEA-97814
[2]: http://jira.codehaus.org/browse/JIBX-465

Issue: SPR-10129
2012-12-28 23:04:44 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Chris Beams 3724b90a8f Add spring-oxm-1.5.xsd
Issue: SPR-10121
2012-12-26 09:31:00 +01:00
Phillip Webb a268528726 Polish .gradle file formatting to use tabs
Replace spaces with tabs for consistency with Java source code
2012-12-09 21:32:27 -08:00
Juergen Hoeller cfdcb54711 Jaxb2Marshaller has non-synchronized access to the JAXBContext once initialized
Issue: SPR-9867
2012-10-12 23:34:17 +02:00
Arjen Poutsma f191a55b8f Preserve comments when using JibxMarshaller
Prior to this commit, JibxMarshaller used a SAX ContentHandler to
marshal to StAX XMLEventWriters, which inadvertently resulted in the
deletion of XML comments.

After this commit, JibxMarshaller adapts the XMLEventWriter into an
XMLStreamWriter and comments are preserved.

Issue: SPR-9768
2012-09-17 14:07:02 +01:00
Arjen Poutsma bd018fc9d7 Optional @XmlRootElement check in Jaxb2Marshaller
Before this commit, the Jaxb2Marshaller required all supported classes
to be annotated with @XmlRootElement. This commit adds a property
'checkForXmlRootElement' (default is true) which allows for un-annotated
classes.

This is especially useful for JAXB2 implementations that can use
external binding files, such as EclipseLink MOXy.

Issue: SPR-9757
2012-09-06 13:12:03 +02:00
Juergen Hoeller 049b944434 polishing (at the occasion of a backport) 2012-08-29 22:00:27 +02:00