Commit Graph

268 Commits

Author SHA1 Message Date
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
Arjen Poutsma 7187a2435e XStreamMarshaller supports stream directly
XStreamMarshaller now supports writing to OutputStreams and reading from
InputStreams directly, as opposed to wrapping streams in a
OutputStreamWriter or InputStreamReader.

Issue: SPR-9663
2012-08-13 13:48:16 +02:00
Juergen Hoeller 309e51ba5b refined fix so that XStreamMarshaller does not wrap IllegalArgumentException
Issue: SPR-9536
2012-07-04 22:58:57 +02:00
Chris Beams c85b611600 Update copyright header for XStreamMarshaller
Issue: SPR-9536
2012-06-25 14:27:05 +02:00
Arjen Poutsma 4c29ad76e0 XStreamMarshaller wraps exception for empty stream
XStreamMarshaller should convert XStream StreamException to Spring
exception in case of unmarshalling an empty stream.

Issue: SPR-9536
2012-06-25 11:34:51 +02:00
Chris Beams f3bcb6e2e4 Update spring.schemas to reflect 3.2 schemas
Commit 180c5b2ef6 introduced 3.2 versions
of all spring-* schemas; this commit updates spring.schemas mapping
files to include these new versions.
2012-05-18 14:31:33 +03:00
Stevo Slavic 51ae6845ad Fix JibxMarshallerTests failing on Windows
Before this change JibxMarshallerTests would fail on Windows with an
error message explaining that JiBX compiler generated classes are not
found on the classpath for binding with name 'binding'. Tests would
execute well on Linux and OS X.

Actual root cause of this bug is found to be in JiBX 1.1.5 release that
is used to build Spring. The binding name can be explicitly specified in
JiBX binding file. If omitted, when generating classes the JiBX compiler
as fall-back mechanism tries to derive the binding name from the binding
file name. That logic had a bug which gets manifested when configured
binding file path has mixed Windows and *nix style file separators, as
in case of JibxMarshallerTests being executed on a Windows platform.

This commit resolves this issue by upgrading Spring's build from JiBX
1.1.5 to 1.2.3, as the bug mentioned was fixed in JiBX 1.2. See JIBX-441
for more details.

Issue: SPR-8360
2012-05-17 10:53:42 +03:00
Stevo Slavic effb762558 Fix javadoc warnings
Before this change there were numerous javadoc warnings being reported
while building Spring framework API.

This commit resolves most of the javadoc warnings, reducing the total
number from 265 to 103.

Issue: SPR-9113
2012-04-30 11:31:02 +03:00
Chris Beams 963b4e49a9 Upgrade to Gradle 1.0-rc1
- Fix deprecation warnings about dynamic properties; favor use of
   "extra properties extensions" per [1]

 - Certain such deprecations are still issued due to violations within
   the docbook-reference plugin. These will be fixed in an upcoming
   revision of the plugin, at which point spring-framework will upgrade
   to depend on it and these warnings will be eliminated

[1] http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html

Issue: SPR-9327
2012-04-14 12:52:07 +03:00
Chris Beams 180c5b2ef6 Introduce 3.2 versions of Spring XML namespaces
Copy spring-*-3.1.xsd => spring-*-3.2.xsd; this commit introduces no
substantive changes, but rather prepares for them by creating a clean
baseline. All internal references to 3.1 schemas (e.g. spring-tool) have
also been updated.
2012-03-26 20:06:06 +03:00
Arjen Poutsma d2251a12c3 Fixed illegal characters in JibxUnmarshallerTests
JibxUnmarshallerTests contained UTF-8 characters; this commit changes
those to the \uXXX notation, as all Java source files should be in
Latin-1.
2012-03-20 09:22:49 +01:00
Stevo Slavic e25183eab1 Use configured encoding during JiBX unmarshalling
Before this change JibxMarshaller did not use the configured encoding
when unmarshalling XML. This caused issues when content being
unmarshalled was not encoded using the default encoding.

This commit fixes the issue by passing configured encoding to JiBX so
it gets used when unmarshalling instead of the default encoding.

Issue: SPR-7865
2012-03-15 15:10:47 +02:00
Arjen Poutsma 43b4997e3f Support scanned classes in Jaxb2Marshaller
Jaxb2Marshaller#supports now supports classes found via package
scanning.

Issue: SPR-9152
2012-02-28 09:49:54 +01:00
Arjen Poutsma 83f3750fb3 Support byte[] in JaxbMarshaller under JDK 7
JDK7 changed its reflections API in order to resolve
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784

In short, JDK 5 and 6 (wrongly) return GenericArrayTypes in certain
reflection scenarios, whereas JDK 7 changed this to return a normal
array type. For Jaxb2Marshaller, this meant that marshaling byte arrays
was not supported under JDK 7.

This change fixes that, so that Jaxb2Marhsaller supports marshalling
byte arrays again (under JDK 5, 6 or 7).
2012-02-27 11:35:26 +01:00
Chris Beams 6235a341a7 Remove bundlor support 2012-01-31 14:37:11 +01:00
Chris Beams 02a4473c62 Rename modules {org.springframework.*=>spring-*}
This renaming more intuitively expresses the relationship between
subprojects and the JAR artifacts they produce.

Tracking history across these renames is possible, but it requires
use of the --follow flag to `git log`, for example

    $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history up until the renaming event, where

    $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history for all changes to the file, before and after the
renaming.

See http://chrisbeams.com/git-diff-across-renamed-directories
2012-01-31 14:37:10 +01:00