Commit Graph

9913 Commits

Author SHA1 Message Date
Kazuki Shimizu c746b10da9 Support @NumberFormat as a meta-annotation
This commit ensures that @NumberFormat can be used as a
meta-annotation, as was already the case for @DateTimeFormat.

In addition, this commit polishes FormattingConversionServiceTests and
MvcNamespaceTests.

Issue: SPR-12743
2015-03-07 21:00:25 +01:00
Sam Brannen 6861d35ea0 Assemble iajc Ant task classpath w/ folders that exist
Prior to this commit, the [ant:iajc] tasks logged numerous warnings
regarding incorrect classpath entries. The reason is that the classpath
was constructed with paths that do not physically exist in the file
system (e.g., for projects that do not have test classes or test
folders (yet)).

This commit picks up where ef75bd8 left off and addresses this issue by
assembling the runtime classpath passed to the iajc task with folders
and JARs that actually exist in the filesystem.
2015-03-07 18:43:14 +01:00
Sam Brannen 789d904658 Assume TestGroup.PERFORMANCE for AnnotationProcessorPerformanceTests
This commit applies the TestGroup.PERFORMANCE assumption for all test
methods within AnnotationProcessorPerformanceTests.
2015-03-07 15:43:09 +01:00
Sam Brannen b1fdb4a773 Remove Gradle Daemon JVM args compatible with JDK 9
This commit reverts the changes made in 7bc44a9 so that developers who
do not use the Gradle daemon are not adversely affected by the explicit
JVM args that were introduced in that commit.

Developers who wish to run the build against JDK 9 with the Gradle
daemon can add the following to the gradle.properties file in their
'gradle user home' directory (e.g., ~/.gradle/gradle.properties):

    org.gradle.daemon=true
    org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m -Xmx1024m

See also: https://issues.gradle.org/browse/GRADLE-3256

Issue: SPR-12549
2015-03-07 15:41:01 +01:00
Stephane Nicoll bd6d974561 Fix Admonition syntax
The upgrade to a more recent asciidoc format led to a bunch of of
broken Admonition as the text block now requires four equal signs while
previous versions tolerated only 3.

Issue: SPR-12791
2015-03-07 07:30:52 +01:00
Juergen Hoeller 5bdc8d269b Polishing
(cherry picked from commit f933941)
2015-03-06 23:52:40 +01:00
Andy Clement b7ef04767a Reduce SpEL compilation restrictions on mathematical expressions
Prior to this change the SpEL compiler would not compile mathematical
expressions where the operands were of differing types (e.g. int
and double). This required the expression writer to do the conversion
in the expression text. For example:

T(Integer).valueOf(someInt).doubleValue()/35d

With this commit the restriction is lifted and it is more like Java
so that you can simply do someInt/35d. The mathematical operators
affected are divide/plus/minus/multiply and modulus. This change
involved removing some guards so that the exitTypeDescriptor (the
trigger for whether compilation is allowed) is set more frequently
and enhancing bytecode generation to perform more sophisticated
conversion/coercion automatically.

Issue: SPR-12789
2015-03-06 10:32:42 -08:00
Juergen Hoeller 7fbc951691 Revised build for JDK 9 tolerance
We use AspectJ 1.9.0.BETA-1 for the ajc task now and exclude spring-oxm test compilation when running on JDK 9.

Issue: SPR-12549
2015-03-06 17:46:53 +01:00
Juergen Hoeller a71001b45c Polishing
Issue: SPR-12778
2015-03-06 17:46:35 +01:00
Juergen Hoeller 5ec2cd7947 AbstractPlatformTransactionManager logs warning for custom isolation level in case of no actual transaction
Issue: SPR-12600
2015-03-06 17:45:45 +01:00
Juergen Hoeller 71cdf856e1 (Reloadable)ResourceBundleMessageSource allows for custom PropertyResourceBundle/Properties subclasses
Issue: SPR-12666
2015-03-06 17:45:37 +01:00
Brian Clozel 450072e38a Add spring-mvc spring-beans XSD schemas for 4.2 2015-03-06 17:02:11 +01:00
Brian Clozel 74072237ee Break down Core and Web chapters in reference doc
Core and Web chapters are important chapters in the Spring Framework
reference documentation, and splitting them in multiple files will
help to evolve the documentation while not creating too many files.

Issue: SPR-12309
2015-03-06 16:59:25 +01:00
Juergen Hoeller ff4ac5b837 Collections.unmodifiableMultiValueMap explicitly casts to List<V> (for compatibility with JDK 9 build 53)
Issue: SPR-12549
2015-03-06 11:52:51 +01:00
Juergen Hoeller 9b25d6ad8b getTypeForFactoryBean suppresses instantiation failures for non-singleton FactoryBeans
Issue: SPR-12786
2015-03-06 11:52:27 +01:00
Brian Clozel 0baf228db5 Modularize asciidoc documentation
The reference documentation is now organized in asciidoc bookparts.
Bookparts sections can be also put in separate files, when their
size and theme are important enough to justify that.

Documentation Layout:
```
index
  |-- overview
  |
  |-- whats-new
  |
  |-- core
  |   |-- core-beans
  |   |-- core-aop
  |-- testing
  |
  |-- data-access
  |
  |-- web
  |   |-- web-mvc
  |   |-- web-view
  |-- integration
  |
  |-- appendix
      |-- appx-spring-tld
      |-- appx-spring-form-tld
```

Supersedes and closes #641

Issue: SPR-12309
2015-03-06 10:54:13 +01:00
Brian Clozel 503956d7c5 Update Asciidoctor Gradle plugin
Upgrade to asciidoctor-gradle-plugin version 1.5.2.
Various syntax fixes in the index.adoc reference documentation.
2015-03-06 10:54:13 +01:00
Rossen Stoyanchev b7dd520784 Fix formatting 2015-03-05 22:50:48 -05:00
Arjen Poutsma 8ab2e47556 HttpMessageConverters should support streaming
All HttpMessageConverters should support StreamingHttpOutputMessage.
Specifically, the BufferedImageHttpMessageConverter and
FormHttpMessageConverter should do so.

Issue: SPR-12715
2015-03-05 22:50:48 -05:00
Rossen Stoyanchev d64c48ff5f UriComponentsBuilder.fromHttpRequest sets port correctly
Issue: SPR-12771
2015-03-05 21:52:27 -05:00
Sam Brannen 7bc44a9086 Set Gradle Daemon JVM args compatible with JDK 9
This commit adds the following to gradle.properties in order to execute
the Gradle daemon on JDK 9, since Gradle's DaemonParameters
automatically sets the MaxPermSize JVM argument, which is no longer
supported on JDK 9.

org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m -Xmx1024m

Issue: SPR-12549
2015-03-06 01:25:12 +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 1e26d17a3d Preparations for JDK 9
Issue: SPR-12549
2015-03-05 18:56:07 +01:00
Juergen Hoeller 7e8ffc7bf5 CompositePropertySource rejects getPropertyNames call when containing a non-enumerable source
Issue: SPR-12788
2015-03-05 18:53:25 +01:00
Juergen Hoeller f786fc3226 ObjectToOptionalConverter preserves existing Optional instances
Issue: SPR-12785
2015-03-05 18:53:03 +01:00
Juergen Hoeller dcb1145354 Converter interface explicitly documents null values
Issue: SPR-12780
2015-03-05 18:52:38 +01:00
Stephane Nicoll 772a26a743 polishing
Issue: SPR-12761
2015-03-05 15:36:08 +01:00
Stephane Nicoll 31df7155ab Refine BeanPostProcessorChecker condition
Previously, adding `@EnableAsync` on a blank application would lead to an
info message stating that `ProxyAsyncConfiguration` is not eligible for
getting processed by all BeanPostProcessors. Concretely, this is ok as
such internal configuration is not meant to be a target of such post
processing.

Revisit the condition for non infrastructure bean only. Add the
infrastructure role to a set of internal configuration, including the
`ProxyAsyncConfiguration`.

Issue: SPR-12761
2015-03-05 11:37:11 +01:00
Stephane Nicoll 5c9f09c2c7 Register lazy @JmsListener components
Support the creation and registration of message listener containers in
a lazy manner, that is after the container initialization has completed.

Such support brought an interesting brainstorming of the thread safety
if JmsListenerEndpointRegistrar and JmsListenerEndpointRegistry so those
have also been revisited as part of this commit.

Issue: SPR-12774
2015-03-04 16:59:55 +01:00
Juergen Hoeller fdd1f83639 Polishing
(cherry picked from commit 3783591)
2015-03-02 22:05:16 +01:00
Juergen Hoeller ab2c721875 LoadTimeWeavingConfiguration should not rely on private field injection
Issue: SPR-12776
(cherry picked from commit 1259671)
2015-03-02 21:58:01 +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
Stephane Nicoll 4a46b60e2a Upgrade to H2 1.4.186 2015-03-02 15:11:20 +01:00
Stephane Nicoll 57d7e9dbff Upgrade XStream (again) to 1.4.8
Revert cdc04e55fe now that animal sniffer 1.1.4 is available.
2015-03-02 14:54:01 +01:00
Stephane Nicoll 268471c637 Upgrade to animal sniffer 1.14 2015-03-02 14:52:54 +01:00
Sam Brannen e24a7ded62 Simplify Groovy ContextLoaders in the TCF
This commit simplifies the implementations of loadBeanDefinitions() in
GenericGroovyXmlContextLoader and GenericGroovyXmlWebContextLoader.

Due to the recent bug fix for GroovyBeanDefinitionReader regarding full
support for XML config files, these Groovy context loaders can now
simply use a GroovyBeanDefinitionReader instead of a
GroovyBeanDefinitionReader plus an XmlBeanDefinitionReader.

Issue: SPR-12769
2015-02-28 23:28:55 +01:00
Sam Brannen 7edc7c2c8f Fully support XML config in GroovyBeanDefinitionReader
Prior to this commit, the GroovyBeanDefinitionReader claimed (via its
Javadoc) that it fully supported XML configuration files in addition to
its Groovy DSL; however, this was unfortunately inaccurate since XML
validation was disabled by default which led to certain features of XML
configuration not working. For example, it was impossible to define a
<qualifier> in an XML config file without specifying the 'type'
attribute (which has a default value defined in the spring-beans XSD).

This commit fixes this issue by ensuring that bean definitions in XML
resources are loaded with a "standard" XmlBeanDefinitionReader that is
created with default settings (i.e., with XML validation enabled). With
regard to backwards compatibility, bean definitions defined using the
Groovy DSL are still loaded with an XmlBeanDefinitionReader that has
XML validation disabled by default which is necessary for proper
parsing of the Groovy DSL.

Issue: SPR-12769
2015-02-28 23:12:13 +01:00
Sam Brannen 9cd065c1ec Polish Javadoc for GroovyBeanDefinitionReader 2015-02-28 19:46:28 +01:00
Sam Brannen 2ba1151b7f Support XML config fully in web integration tests
Prior to this commit, it was impossible to use all features of XML
configuration (e.g., the <qualifier> tag) in web-based integration
tests (loaded using @WebAppConfiguration, @ContextConfiguration, etc.)
if the Groovy library was on the classpath. The reason is that the
GroovyBeanDefinitionReader used internally by
GenericGroovyXmlWebContextLoader disables XML validation for its
internal XmlBeanDefinitionReader, and this prevents some XML
configuration features from working properly. For example, the default
value for the 'type' attribute (defined in the spring-beans XSD) of the
<qualifier> tag gets ignored, resulting in an exception when the
application context is loaded.

This commit addresses this issue by refactoring the implementation of
loadBeanDefinitions() in GenericGroovyXmlWebContextLoader to use an
XmlBeanDefinitionReader or GroovyBeanDefinitionReader depending on the
file extension of the resource location from which bean definitions
should be loaded. This aligns the functionality of
GenericGroovyXmlWebContextLoader with the existing functionality of
GenericGroovyXmlContextLoader.

Issue: SPR-12768
2015-02-28 19:06:40 +01:00
Sam Brannen fa5ea38210 Delete unused import in AsyncTests 2015-02-28 19:05:37 +01:00
Sam Brannen 93c70b7440 Include charset in EncodedResource.equals()
Prior to this commit, the implementation of equals() in EncodedResource
was based solely on the resource and encoding. Thus, if a Charset were
specified instead of an encoding, invocations of equals() would not
work as expected.

This commit addresses this issue by including the charset in the
implementation of equals() and introducing corresponding tests in a new
EncodedResourceTests class. Furthermore, this commit makes
EncodedResource immutable and updates all Javadoc to reflect support
for the encoding and charset properties.

Issue: SPR-12767
2015-02-28 17:37:02 +01:00
Stephane Nicoll babbf6e871 Harmonize resources location
Issue: SPR-12766
2015-02-28 10:32:40 +01:00
Sam Brannen 23d52d5e35 Polish Javadoc for ScriptStatementFailedException constructor
Issue: SPR-12752
2015-02-28 00:12:53 +01:00
Juergen Hoeller 540d8792fe Fixed javadoc warnings and revised FastByteArrayOutputStream code style 2015-02-27 23:49:55 +01:00
Sam Brannen 45a80fa3ed Polish Javadoc for ScriptStatementFailedException.buildErrorMessage()
Issue: SPR-12752
2015-02-27 23:17:32 +01:00
Juergen Hoeller 2b3409461f Polishing 2015-02-27 22:29:42 +01:00
Juergen Hoeller c1a9e3484a Revised documentation on AUTO_ACKNOWLEDGE behavior
Issue: SPR-12705
2015-02-27 22:28:18 +01:00
Juergen Hoeller 594a14ab25 RestTemplate avoids use of warn level for response errors
Protected handleResponse method replaces former private logResponseStatus/handleResponseError methods.

Issue: SPR-12760
2015-02-27 22:28:07 +01:00
Sam Brannen 9d1e7fde3a Update Eclipse JDT settings for Java 8
- classes now compiled with `-parameters`
- formatting for lambda expressions
- formatting for type annotations
2015-02-27 21:41:52 +01:00