Commit Graph

268 Commits

Author SHA1 Message Date
igor-suhorukov 67a91cf6f9 Polish: redundant pairs of parentheses should be removed 2018-02-25 00:01:43 +01:00
Juergen Hoeller a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
igor-suhorukov d5b0df8c3f Polish codacy warning: fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 2018-02-16 09:38:19 +01:00
igor-suhorukov 2be4985b8f Polish: anonymous inner classes containing only one method should become lambdas,
use getOrDefault instead of ternary operator
2018-02-16 09:38:19 +01:00
Juergen Hoeller de7ff556d9 Polishing 2018-02-14 17:41:08 +01:00
Juergen Hoeller 3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
Juergen Hoeller 0c78c9c6f7 Refined javadoc and exception messages 2018-02-13 15:25:42 +01:00
Juergen Hoeller d3cee45f30 Polishing 2018-02-13 13:15:29 +01:00
Sam Brannen 02fb5a4121 Use effectively final local variable in lambda expression 2018-02-13 12:56:36 +01:00
Vladimir Sitnikov 659f13be1c Avoid creating message arguments to Assert.isABC calls
See 67f184293b
2018-02-13 12:31:49 +01:00
Juergen Hoeller 0cc644f61f Polishing 2017-11-21 16:34:08 +01:00
Juergen Hoeller 08c78554b9 Deprecate Castor support
Issue: SPR-16219
2017-11-20 22:27:47 +01:00
Juergen Hoeller 9bab7a2708 Upgrade to Java Activation Framework 1.2 for test runtime
Includes upgrade to Hibernate Validator 6.0.4 (where applicable)

Issue: SPR-16115
2017-10-25 19:18:10 +02:00
Sam Brannen 8f4fb207d7 Reinstate CastorUnmarshallerTests.clearCollectionsFalse() 2017-10-15 16:16:48 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller 65f556c0e2 Downgrade xjc to 2.2.11 (while keeping JAXB at 2.3.0 general)
Issue: SPR-15996
2017-09-24 18:05:59 +02:00
Juergen Hoeller e2882fe1db Build against EE 8 API level wherever possible
Upgrade to JAXB 2.3, JAX-WS 2.3, Annotations 1.3.1, Interceptor 1.2.1.
Also includes Log4J 2.9.1 and Asciidoctor 1.5.6.
2017-09-24 17:18:21 +02:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Brian Clozel 5460c0095b Fix Gradle warnings about task output
As of Gradle 4.0, project SourceSets can have multiple output
directories (one per programming language).
This commit fixes warnings that are logged when a single output dir
is considered by tasks.

Issue: SPR-15885
2017-08-21 14:42:12 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Juergen Hoeller 140542e8b1 Polishing 2017-06-26 18:59:17 +02:00
Stephane Nicoll 1ab678a2a3 Polish "Refactor iterator of Map with Java8's Map.forEach"
Closes gh-1459
2017-06-13 16:06:20 +02:00
diguage 1ef5f61ab2 Refactor iterator of Map with Java8's Map.forEach
See gh-1459
2017-06-13 16:06:20 +02:00
Juergen Hoeller f813712f5b Consistent use of @Nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.

Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.

Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Sebastien Deleuze 1f28825f9d Add more @Nullable parameters based on null usage
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Sebastien Deleuze b47d713e14 Add missing @Nullable annotations on parameters
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Sebastien Deleuze 87598f48e4 Introduce null-safety of Spring Framework API
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.

In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.

@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.

In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.

Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Juergen Hoeller e644c557e7 Latest dependency updates (RxJava 1.2.9, JiBX 1.3.1, H2 1.4.194, JBoss Logging 3.3.1, WebJars Locator 0.32-1) 2017-03-24 18:01:11 +01:00
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller 54da4a8c8e Correct reference to XJC classpath 2017-01-17 14:00:15 +01:00
Juergen Hoeller 1cb381e9a7 Consistent deprecation markers on JDK 9 2017-01-13 10:53:20 +01:00
Sam Brannen 9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Juergen Hoeller 82c1c859d9 Polishing
(cherry picked from commit 9cb4de8)
2016-12-20 21:17:48 +01:00
Juergen Hoeller cf6a5835cc Polishing 2016-12-08 18:39:30 +01:00
Juergen Hoeller 59a24b406a Polishing 2016-08-10 14:20:42 +02:00
Juergen Hoeller 3ab86c10c9 Polishing 2016-07-25 17:43:58 +02:00
Juergen Hoeller 01110f678d Upgrade JiBX (and BCEL) towards support of 1.8 bytecode level
This commit also drops the now-unused CUSTOM_COMPILATION test group and the outdated JavaVersion class.

Issue: SPR-10423
2016-07-25 14:10:46 +02:00
Marius Grama 3635c9dbfe Update xmlunit library to version 2.1.0
xmlunit 2.1.0 is the latest release for xmlunit.
Most of the xmlunit functionality used within spring-framework
was done through the xmlunit 1.x helper class
`org.custommonkey.xmlunit.XMLAssert`.

As of xmlunit 2.0.0 most of the XML comparison methods are done
through hamcrest matchers exposed by the xmlunit-matchers
library. In some cases during the migration, the matchers
had to be customized with custom `NodeMatcher` or
`DifferenceEvaluator` instances in order to keep the assertions
correct (they were performed with xmlunit 1.x previously).

Issue: SPR-14043
2016-07-21 15:04:21 +02:00
Juergen Hoeller 88fcd0a2ed Framework build compatible with JDK 9 (tests running against java.base module)
Issue: SPR-13344
2016-07-19 19:37:34 +02:00
Juergen Hoeller aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller c43e7497c1 Fixed typo: "occured"->"occurred" 2016-07-08 15:12:16 +02:00
Juergen Hoeller bc2c22d51e Streamline XML namespace support towards unversioned schemas
This commit also removes support code for outdated options which were only available in older schema versions.

Issue: SPR-13499
2016-07-05 20:50:03 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller d0aa607200 Remove XMLBeans support
Issue: SPR-13796
2016-07-04 23:29:29 +02:00
Juergen Hoeller 3c987b179d Upgrade to EhCache 3.0.2 and Castor 1.4.1 2016-06-06 22:22:23 +02:00
Juergen Hoeller f61b998447 AbstractMarshaller defensively uses DocumentBuilderFactory within synchronized block
Issue: SPR-13935
2016-02-10 16:22:13 +01:00
Juergen Hoeller 8ce5e88c66 Require Jackson 2.6+, FreeMarker 2.3.21+, XStream 1.4.5+
Issue: SPR-13062
2015-12-17 17:14:50 +01:00
Stephane Nicoll 752d3c715a Initiate structure for 4.3 XSDs 2015-12-17 15:43:23 +01:00
Juergen Hoeller b880b4a545 Upgrade to Castor 1.4 2015-12-15 11:53:28 +01:00
Juergen Hoeller 11806b9215 Class identity comparisons wherever possible (and further polishing)
Issue: SPR-12926
2015-12-09 12:28:09 +01:00
Johnny Lim 2defb6555e Fix broken Javadoc related to `<` and `>` 2015-11-12 11:22:08 +01:00
Sam Brannen d5ee787e1e Migrate JUnit 3 tests to JUnit 4
This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
the exception of Spring's legacy JUnit 3.8 based testing framework that
is still in use in the spring-orm module.

Issue: SPR-13514
2015-09-27 21:17:51 +02:00
Juergen Hoeller b9d7913407 Deprecate XmlBeans support (following the XMLBeans retirement at Apache)
Issue: SPR-13399
2015-08-27 11:52:50 +02:00
Juergen Hoeller 5e9a96817b Completely remove JdkVersion check from Jaxb2Marshaller
Issue: SPR-13312
2015-08-12 17:45:37 +02:00
Sam Brannen 27e9db8c8c Fix regression in Jaxb2Marshaller regarding JdkVersion
Issue: SPR-13312
2015-08-12 17:35:03 +02:00
Juergen Hoeller bec3b0fa1a Deprecate JdkVersion (for optimistic compatibility with newer JDK generations)
Issue: SPR-13312
2015-08-12 16:14:43 +02:00
Stephane Nicoll a3f39d5257 Add missing 4.2 XSDs
Issue: SPR-13300
2015-08-01 09:50:36 +02:00
Juergen Hoeller 18c4671318 JAXB scan skips annotated interfaces
Issue: SPR-13221
2015-07-13 14:59:53 +02:00
Juergen Hoeller 0411435bac XML parsing tests pass on non-English locales now, plus a revised exception message and some minor polishing
Issue: SPR-13136
(cherry picked from commit 38b8262e1e)
2015-06-30 17:16:45 +02:00
Rossen Stoyanchev d79ec68db4 Disable DTD when parsing untrusted XML input
Issue: SPR-13136
2015-06-30 07:50:21 -04:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Stephane Nicoll 95acf8c989 Remove references to codehaus.org
Issue: SPR-13129
2015-06-15 15:44:29 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Juergen Hoeller 5bdc8d269b Polishing
(cherry picked from commit f933941)
2015-03-06 23:52:40 +01:00
Juergen Hoeller f8fd19d2be Dependency updates for spring-oxm generation tasks 2015-03-05 18:57:50 +01:00
Juergen Hoeller b541fc9366 Polishing 2015-03-05 18:56:57 +01:00
Juergen Hoeller ee74fe6c27 Latest dependency updates (HttpClient 4.4, TestNG 6.8.21, SnakeYAML 1.15, FreeMarker 2.3.22, JRuby 1.7.19, JAMon 2.81, JiBX 1.2.6, XMLUnit 1.6, JsonPath 1.2) 2015-03-02 20:00:17 +01:00
Juergen Hoeller 9ac02b319d Remove pre-3.2 deprecated classes and methods
Issue: SPR-12578
2014-12-30 20:05:15 +01:00
Juergen Hoeller ad2d5952c6 XmlOptionsFactoryBean initializes empty XmlOptions by default and uses efficient entrySet iteration
Issue: SPR-12383
2014-10-28 13:34:56 +01:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Juergen Hoeller ad475ffadf Consistent vararg declarations for String array setters 2014-08-08 17:17:09 +02:00
Stephane Nicoll dd2bf28a4f Add missing XSDs
Commit b676c41805 should have added the 4.1 XSDs for the jdbc and oxm
modules.

Issue: SPR-12011
2014-07-19 18:42:05 +02:00
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
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