Commit Graph

9789 Commits

Author SHA1 Message Date
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
Juergen Hoeller
ce085a606f Revised condition override check based on method names instead of bean names
Issue: SPR-12744
(cherry picked from commit bb5b5d5)
2015-02-25 20:37:47 +01:00
Juergen Hoeller
c0e550cfb4 ScriptUtils properly refers to statement numbers instead of line numbers
Issue: SPR-12752
(cherry picked from commit 8f228d1)
2015-02-25 20:37:37 +01:00
Juergen Hoeller
7a5b2e6a75 Latest dependency updates (Tomcat 8.0.20, Jetty 9.2.9, EhCache 2.9.1, EhCache-JCache 1.0.1) 2015-02-25 20:37:09 +01:00
Spring Buildmaster
d7dcf8d6f4 Next Development Version 2015-02-20 03:10:10 -08:00
Juergen Hoeller
d77af71e9c Revised common validation methods in AbstractMessageConverterMethodArgumentResolver
The protected validation methods are analogous to ModelAttributeMethodProcessor now.

Issue: SPR-12655
(cherry picked from commit 7191050)
2015-02-19 23:53:16 +01:00
Sebastien Deleuze
5db4e4bab0 Adjust log level for invalid SockJS or Websocket requests 2015-02-19 16:06:06 +01:00
Sebastien Deleuze
7cc56e1630 Improve error handling in WebUtils.isValidOrigin()
With this commit, WebUtils.isValidOrigin() logs an error message instead
of throwing an IllegalArgumentException when Origin header value is
invalid (for example when it does not contain the scheme).

Issue: SPR-12697
2015-02-19 14:12:10 +01:00
Juergen Hoeller
b5e80390de Correct reference to executeAndReturnKey method
Issue: SPR-12639
(cherry picked from commit f20a624)
2015-02-18 22:30:20 +01:00
Juergen Hoeller
55a14eb684 MessageHeaderAccessor defensively checks id, timestamp and contentType values
Issue: SPR-12730
(cherry picked from commit dbd353b)
2015-02-18 22:30:04 +01:00
Sam Brannen
d8269dd9fe Polish reference manual regarding WebSocket
- fixed typos
 - improved grammar and punctuation
 - fixed class names

(cherry picked from commit c7a456c0bf)
2015-02-18 20:33:34 +01:00
Juergen Hoeller
aae7583141 Latest dependency updates (Groovy 2.3.10, SLF4J 1.7.10) 2015-02-18 18:54:38 +01:00
Rossen Stoyanchev
6fafe63311 Ignore Pong messages in StompSubProtocolHandler
Issue: SPR-12728
2015-02-18 12:27:13 -05:00
Rossen Stoyanchev
f1e406c63b Fix handling of empty payload Pong message on Jetty
Issue: SPR-12727
2015-02-18 12:27:13 -05:00
Juergen Hoeller
c8a4d1649f Latest dependency updates (AspectJ 1.8.5, Joda-Time 2.7, H2 1.4.185) 2015-02-18 17:54:43 +01:00
Juergen Hoeller
8dbe753963 Polishing 2015-02-18 17:54:16 +01:00
Sebastien Deleuze
23fa37b08b Change SockJS and Websocket default allowedOrigins to same origin
This commit adds support for a same origin check that compares
Origin header to Host header. It also changes the default setting
from all origins allowed to only same origin allowed.

Issues: SPR-12697, SPR-12685
(cherry picked from commit 6062e15)
2015-02-18 17:26:55 +01:00
Sebastien Deleuze
cc78d40c6b Fix SockJS origin check
This commit introduces the following changes:
 - Requests without Origin header are not rejected anymore
 - Disable Iframe when allowedOrigins is not empty and not equals to *
 - The Iframe is not cached anymore in order to have a reliable origin check
 - allowedOrigins must not be null or empty
 - allowedOrigins format is now validated (should be * or start by http(s)://)

Issue: SPR-12660
(cherry picked from commit 9b3319b)
2015-02-18 17:26:44 +01:00