Commit Graph

91 Commits

Author SHA1 Message Date
Juergen Hoeller 6fef8b996c Polishing 2014-05-20 10:46:06 +02:00
Rossen Stoyanchev 8e096aeef5 Disable URL resolution in DTD declarations
Issue: SPR-11768
2014-05-19 22:45:12 -04:00
Juergen Hoeller 6f2e61b19f Polishing
(cherry picked from commit c97c246)
2014-04-28 00:47:50 +02:00
Juergen Hoeller 63733c4805 AbstractMarshaller avoids SAXSource workaround when processExternalEntities=true
Issue: SPR-11737
(cherry picked from commit 93d13cf)
(cherry picked from commit 4196e6c)
2014-04-28 00:47:39 +02:00
Stephane Nicoll 5559209233 Remove useless imports 2014-04-22 09:57:12 +02:00
Juergen Hoeller f5cce14fe7 XStreamMarshaller supports custom NameCoder strategy
Issue: SPR-11702
2014-04-16 23:08:32 +02:00
Juergen Hoeller 196cdef182 AbstractMarshaller uses general exception message in extracted buildDocument() method
Issue: SPR-11635
(cherry picked from commit f7a17ad)
2014-04-09 20:58:07 +02:00
Juergen Hoeller d4b0ae9787 AbstractMarshaller pre-implements getDefaultEncoding() method
Issue: SPR-11635
2014-04-09 17:42:56 +02:00
Juergen Hoeller 8f28a9352e XStreamMarshaller lazily creates fallback XppDriver
Issue: SPR-11635
2014-04-09 17:42:45 +02:00
Arjen Poutsma f2f355e76c Improved StAX<->SAX bridge
Improved the SAX to StAX (and vice-versa) bridge exposed via StaxUtils.
The old integration had some issues with namespace declaration
attributes, brought to light in a XMLUnit upgrade.

Issue: SPR-11549
2014-03-25 20:58:58 +01:00
Juergen Hoeller dd7f54c3c0 Revised ResizableByteArrayOutputStream as an actual subclass of ByteArrayOutputStream, and consistently applied appropriate ByteArrayOutputStream initial capacities across the codebase
Issue: SPR-11594
2014-03-24 22:57:38 +01:00
Stephane Nicoll 4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Sam Brannen 9dcd03d862 Clean up imports and warnings 2014-03-14 17:34:21 +01:00
Sam Brannen c8f2e07182 Clean up test warnings that show up in Gradle console 2014-03-06 14:50:46 +01:00
Rossen Stoyanchev edba32b309 Add processExternalEntities support to OXM
Update OXM AbstractMarshaller to support processing of external
XML entities. By default external entities will not be processed.

Issue: SPR-11376
2014-02-18 15:54:30 -08:00
Sam Brannen 1f778530b5 Polish test classes
- Consistent importing of org.junit.Assert.*;
- Proper declaration of expected exceptions via @Test(expected).
- Renamed SpEL ExpressionTestCase to AbstractExpressionTests.
- Formatting and test method naming conventions.
2014-02-08 17:24:11 +01:00
Juergen Hoeller c1ef552359 Polishing 2014-01-25 15:26:27 +01:00
Sam Brannen 31a74b0ff6 Clean up generics warnings in spring-oxm tests 2014-01-25 14:17:25 +01:00
Sam Brannen 5e7811a45d Polish Javadoc in XStreamMarshaller 2014-01-25 14:03:18 +01:00
Arjen Poutsma cf6cf18f1a Corrected CatchAllConverter ordering docs
Corrected documentation regarding the CatchAllConverter in the XStream
javadocs.
2014-01-08 14:27:58 +01:00
Juergen Hoeller a0ccd65d51 Consistent build dependencies 2014-01-05 03:00:12 +01:00
Juergen Hoeller 26d143868f Compatibility with XStream 1.4.5
XStream 1.4.5 doesn't check a given ConverterLookup for a ConverterRegistry implementation anymore, so we have to manually perform that check and assignment.

Issue: SPR-11147
2013-12-09 22:47:16 +01:00
Phillip Webb 043a41e382 Consistent whitespace after imports
Update code to have a consistent number of new-line characters after
import statements.
2013-11-26 15:14:43 -08:00
Phillip Webb a31ac882c5 Fix various javadoc warnings 2013-11-26 13:25:37 -08:00
Eric Dahl e9f78f6043 Fix various typos
Fix a variety of typos throughout the project, primarily in
comments (javadoc or otherwise) but also in a handful of log messages
and a couple exception messages.

ISSUE: SPR-11123
2013-11-25 15:58:27 -08:00
Phillip Webb 59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
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