Commit Graph

9806 Commits

Author SHA1 Message Date
Juergen Hoeller
6892ad42d6 Alignment with ResolvableType revision in master 2015-03-24 21:17:48 +01:00
Juergen Hoeller
1d5128ed1b Polishing 2015-03-23 22:24:23 +01:00
Juergen Hoeller
34aac078b1 Deferred import processing reliably detects late registration attempts
Issue: SPR-12838
(cherry picked from commit 1a8c6fa)
2015-03-23 22:02:41 +01:00
Stephane Nicoll
f52702ea3c Restore proper use of CacheLoader
Since Guava 11, CacheLoader is only invoked with a LoadingCache but the
GuavaCache wrapper is always invoking getIfPresent(), available on the
main Guava Cache interface.

Update GuavaCache#get to check for the presence of a LoadingCache and
call the appropriate method.

Issue: SPR-12842
(cherry picked from commit 9172a6d)
2015-03-23 22:02:25 +01:00
Juergen Hoeller
d2d006b68f Latest dependency updates (Groovy 2.3.11, Jetty 9.2.10, Netty 4.0.26, Undertow 1.1.3) 2015-03-21 00:37:04 +01:00
Juergen Hoeller
8d14e7736a Polishing
(cherry picked from commit 162ee36)
2015-03-21 00:35:08 +01:00
Juergen Hoeller
2de5faf56c BeansDtdResolver resolves spring-beans.dtd declarations to spring-beans-2.0.dtd file
Issue: SPR-12836
(cherry picked from commit 8e4bfa9)
2015-03-20 23:58:29 +01:00
Juergen Hoeller
5f95ff6bfd Optimized access to resolved bean type (avoiding BeanFactory locks)
Revised HandlerMethod.getBeanType() impl for both web and messaging.
In addition, HandlerMethods get created with the internal BeanFactory now.

Issue: SPR-12832
(cherry picked from commit 898c24f)
2015-03-20 23:58:22 +01:00
Juergen Hoeller
4446b5fe8a Revised DefaultManagedAwareThreadFactory to make its non-JNDI fallback work
Issue: SPR-12830
(cherry picked from commit a3e5fbf)
2015-03-20 23:56:50 +01:00
Juergen Hoeller
76649a4455 Explicit documentation on 4.1+ properties in AbstractMessageListenerContainer
(cherry picked from commit 6f98cf3)
2015-03-20 23:56:37 +01:00
Juergen Hoeller
98d00ea698 Explicit documentation on MutablePersistenceUnitInfo's addManagedPackage
Issue: SPR-12821
(cherry picked from commit 4f1d9fd)
2015-03-20 23:56:28 +01:00
Juergen Hoeller
ce84fafde4 ContentCachingRequestWrapper converts IOException to IllegalStateException
Issue: SPR-12810
2015-03-13 20:19:31 +01:00
Juergen Hoeller
b352dbfdeb Polishing (in particular updating javadoc references to Apache Commons)
(cherry picked from commit bc6a98c)
2015-03-13 20:13:21 +01:00
Rossen Stoyanchev
f42c53d9be Support comma-separated X-Forwarded-Proto
Issue: SPR-12816
2015-03-13 13:05:11 -04:00
Brian Clozel
151e96cac4 Fix InputStream caching in ContentCachingReqWrapper
Prior to this commit, the ContentCachingRequestWrapper would immediately
consume the wrapped request's InputStream when asked for the cached
content; that caused several issues:

* the request body was read in memory even if it wasn't yet consumed by
the application, leading to inefficiencies.
* when requesting the InputStream, an empty InputStream was returned
since the original was already read.

This case only happened for form POSTs requests.

This commit makes sure that the wrapper does not alter the request
expected behavior:

* when getting the inputstream, it is wrapped in order to cache its
content
* when getting request parameters, the request body is cached and its
inputstream is consumed, as expected

Issue: SPR-12810
2015-03-13 16:11:17 +01:00
Rossen Stoyanchev
a522fa36af Support comma-separated X-Forwarded-Port
Issue: SPR-12813
2015-03-13 10:02:14 -04:00
Rossen Stoyanchev
5c463a1680 Move X-Forwarded-* tests to UriComponentsBuilderTests 2015-03-13 10:02:00 -04:00
Juergen Hoeller
0280a2a994 Explicit note on change of read-only handling in 4.1
Issue: SPR-8959
2015-03-11 21:25:12 +01:00
Juergen Hoeller
b455626ce1 Fine-tuned varargs handling in ReflectiveMethodResolver (including useDistance mode)
Issue: SPR-12803
Issue: SPR-12808
2015-03-11 21:18:05 +01:00
Juergen Hoeller
cb6459c271 ResponseEntity's headers(HttpHeaders) accepts null value
Issue: SPR-12792
(cherry picked from commit 73e8021)
2015-03-10 15:19:06 +01:00
Juergen Hoeller
6b9e89118f StandardMultipartFile declares itself as Serializable now
Issue: SPR-12795
(cherry picked from commit 5ba7b89)
2015-03-10 15:18:43 +01:00
Juergen Hoeller
f2b9a0a117 PropertyResourceConfigurerTests accepts "." in operating system name
Issue: SPR-12794
(cherry picked from commit 6fe85c2)
2015-03-10 15:18:26 +01:00
Stephane Nicoll
406adb3381 Call AsyncUncaughtExceptionHandler when necessary
If a sub-class of Future (such as ListenableFuture) is used as a return
type and an exception is thrown, the AsyncUncaughtExceptionHandler is
called. Now checking for any Future implementation instead of a faulty
strict matching.

Issue: SPR-12797
2015-03-09 09:59:12 +01:00
Sam Brannen
bac012f3e8 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
(backported from commits df1d90f & c3408d8)
2015-03-07 21:44:42 +01:00
Juergen Hoeller
f93394171a Polishing 2015-03-06 23:51:32 +01:00
Juergen Hoeller
ebe45cf079 Dependency updates for spring-oxm generation tasks
(cherry picked from commit f8fd19d)
2015-03-06 18:50:54 +01:00
Juergen Hoeller
7ed7f981c9 Polishing
(cherry picked from commit b541fc9)
2015-03-06 18:50:49 +01:00
Juergen Hoeller
f01a0303f1 getTypeForFactoryBean suppresses instantiation failures for non-singleton FactoryBeans
Issue: SPR-12786
(cherry picked from commit 9b25d6a)
2015-03-06 18:10:28 +01:00
Juergen Hoeller
f2691901bb ObjectToOptionalConverter preserves existing Optional instances
Issue: SPR-12785
(cherry picked from commit f786fc3)
2015-03-06 18:09:32 +01:00
Juergen Hoeller
5f305759fa Converter interface explicitly documents null values
Issue: SPR-12780
(cherry picked from commit dcb1145)
2015-03-06 18:09:13 +01:00
Rossen Stoyanchev
410fc6d763 UriComponentsBuilder.fromHttpRequest sets port correctly
Cherry-picked from commit d64c48 on master

Issue: SPR-12771
2015-03-05 21:54:46 -05:00
Juergen Hoeller
3783591083 Polishing
(cherry picked from commit e5207e6)
2015-03-02 21:56:21 +01:00
Juergen Hoeller
1259671f3f LoadTimeWeavingConfiguration should not rely on private field injection
Issue: SPR-12776
2015-03-02 21:42:01 +01:00
Juergen Hoeller
590b23ccb3 Latest dependency updates (XMLUnit 1.6, JsonPath 1.2, H2 1.4.186) 2015-03-02 20:06:36 +01:00
Juergen Hoeller
2d98988d5c Latest dependency updates (SnakeYAML 1.15, FreeMarker 2.3.22, JRuby 1.7.19, JAMon 2.81, JiBX 1.2.6, XMLUnit 1.6) 2015-03-02 14:06:06 +01:00
Juergen Hoeller
364210b0e7 Fixed javadoc 2015-03-02 14:00:05 +01:00
Sam Brannen
b6f22aa514 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
(cherry picked from commit 7edc7c2c8f)
2015-02-28 23:19:57 +01:00
Sam Brannen
522c1b1b3d Polish Javadoc for GroovyBeanDefinitionReader 2015-02-28 23:19:27 +01:00
Sam Brannen
55eb5b622c 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
(cherry picked from commit 2ba1151b7f)
2015-02-28 19:12:07 +01:00
Sam Brannen
6c93745f35 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
(cherry picked from commit 93c70b7440)
2015-02-28 17:54:06 +01:00
Juergen Hoeller
ca9f6a1e1e Fixed javadoc warnings 2015-02-27 22:43:21 +01:00
Juergen Hoeller
3570a9a94a Polishing
(cherry picked from commit 2b34094)
2015-02-27 22:36:02 +01:00
Juergen Hoeller
91c47a9eb8 Revised documentation on AUTO_ACKNOWLEDGE behavior
Issue: SPR-12705
(cherry picked from commit c1a9e34)
2015-02-27 22:34:07 +01:00
Juergen Hoeller
7eb4679f28 RestTemplate avoids use of warn level for response errors
Protected handleResponse method replaces former private logResponseStatus/handleResponseError methods.

Issue: SPR-12760
(cherry picked from commit 594a14a)
2015-02-27 22:33:55 +01:00
Sam Brannen
0f95c81712 Refer to statement numbers in ScriptStatementFailedException
ScriptStatementFailedException now properly refers to statement numbers
instead of line numbers.

Issue: SPR-12752
(cherry picked from commit 291b3de72b)
2015-02-27 19:36:36 +01:00
Brian Clozel
2c47098b35 Allow file locations for resource handling
Prior to this change, location checks for serving resources would append
`/` to the location path it didn't already have one.

This commit makes sure not to append a `/` if the provided location is
actually a file.

Issue: SPR-12747
2015-02-27 18:46:10 +01:00
Rossen Stoyanchev
b4d9fb9e6e Prevent ISE in the MockMvc PrintingResultHandler
Issue: SPR-12735
2015-02-27 11:33:57 -05:00
Rossen Stoyanchev
4a332bd0b2 Fix white space issues 2015-02-27 11:33:49 -05:00
Juergen Hoeller
772552b9ef Avoid potential deadlocks between event multicaster and singleton registry through shared lock
Issue: SPR-12739
(cherry picked from commit 81102de)
2015-02-26 20:54:00 +01:00
Juergen Hoeller
6be554cba5 Polishing
(cherry picked from commit cc33d3f)
2015-02-25 20:38:18 +01:00