Commit Graph

10912 Commits

Author SHA1 Message Date
Juergen Hoeller
79e24aeced Upgrade to Hibernate ORM 5.0 GA
Issue: SPR-13002
2015-08-21 16:56:57 +02:00
Juergen Hoeller
05a16a1bfa Avoid ambiguous property warning for methods with multiple parameters
Issue: SPR-13349
2015-08-21 16:55:04 +02:00
Rossen Stoyanchev
27899abcb6 Publish events only after successful channel send
The StompSubProtcolHandler now checks the outcome of the send to the
inbound client channel. If the message was prevented from being sent,
e.g. as part of authorization, events are not published

Issue: SPR-13339
2015-08-21 10:46:54 -04:00
Rossen Stoyanchev
473dd5e9e8 Unwrap if necessary for MultipartHttpServletRequest
Before this commit RequestPartServletServerHttpRequest simply did an
instanceof check for MultipartHttpServletRequest. That hasn't failed
because request wrapping typically happens in filters before the
DispatcherServlet calls the MultipartResolver.

With Spring MVC Test and the Spring Security integraiton however,
this order is reversed since there we prepare the multipart request
upfront, i.e. there is no actual parsing.

The commit unwraps the request if necessary.

Issue: SPR-13317
2015-08-21 10:28:08 -04:00
Stephane Nicoll
22948bd7f0 Add hook to create custom BeanPropertyBindingResult
Issue: SPR-13373
2015-08-20 19:50:37 +02:00
Sam Brannen
a3e7848a30 Clean up warnings and tests in spring-core 2015-08-20 15:49:33 +02:00
Sam Brannen
9ab4062317 Clean up warnings in tests in spring-jdbc 2015-08-19 23:29:57 +02:00
Sam Brannen
d54aab2338 Log connection URL for embedded databases
Prior to this commit, EmbeddedDatabaseFactory logged the name of an
embedded database just before it was created; however, the name alone
is not sufficient for connecting to the database via external tools
such as the H2 Web Console.

This commit updates EmbeddedDatabaseFactory to make it easier to
connect to embedded databases via external tools by logging the
complete connection URL for an embedded database as it's being created.
In addition, EmbeddedDatabaseFactory now logs when an embedded database
is being shut down.

Issue: SPR-13370
2015-08-19 22:22:11 +02:00
Sam Brannen
2025d5c35e Polish Javadoc and log messages for embedded databases 2015-08-19 21:44:07 +02:00
Sam Brannen
0cd21aa55f Fix typo in Javadoc for TestContextBootstrapper 2015-08-19 20:52:36 +02:00
Sebastien Deleuze
d4c74ad346 Add an ObjectMapper constructor to MappingJackson2(Json|Xml)View
Instead of having to use the default constructor then calling
setObjectMapper(ObjectMapper), these constructors allow
MappingJackson2JsonView and MappingJackson2XmlView to be created and
configured with the desired object mapper in one step.
2015-08-19 14:04:15 +02:00
xueyua
ddd6c9bea0 Fix typos in Web MVC documentation 2015-08-18 16:18:45 +02:00
Sebastien Deleuze
be7514f490 Polish Jackson2ObjectMapperBuilderTests 2015-08-18 14:28:16 +02:00
Craig Andrews
cccf5f65f5 Register jackson-datatype-jdk7 module when using Java 7
Issue: SPR-13354
2015-08-18 14:20:08 +02:00
Sebastien Deleuze
d53f0b995a Polish GenericHttpMessageConverter
Issue: SPR-13318
2015-08-17 17:57:13 +02:00
Sebastien Deleuze
4338719d98 Serialize with type only collections in Jackson HttpMessageConverter
Issue: SPR-13318
2015-08-17 17:17:51 +02:00
Stephane Nicoll
71585c909a Polish 2015-08-17 14:44:59 +02:00
Juergen Hoeller
3d2e2cb3ae Upgrade to Reactor 2.0.5 2015-08-17 13:00:29 +02:00
Sam Brannen
94639d2dcf Update @since tag in Eclipse code template to 4.2.1 2015-08-17 01:19:22 +02:00
Sam Brannen
68c39570fe Revert "Increase randomness in SocketUtils"
This reverts commit d5944c4e39.
2015-08-16 14:39:48 +02:00
Stephane Nicoll
21629d315c Merge pull request #844 from paulvi/patch-1
* pr/844:
  Add link to docs
2015-08-16 13:46:47 +02:00
Paul Verest
f486324b42 Add link to docs
Closes gh-844
2015-08-16 13:46:26 +02:00
Sam Brannen
d5944c4e39 Increase randomness in SocketUtils 2015-08-15 23:48:20 +02:00
Sam Brannen
1d3da12204 Clean up warnings 2015-08-15 21:30:32 +02:00
Sam Brannen
c572d0c469 Increase timeout in StompWebSocketIntegrationTests
... with hope of reducing the fragility of these tests on the CI server.
2015-08-15 21:30:17 +02:00
Sam Brannen
7a17abe448 Introduce empty & non-empty JsonPath matchers
This commit introduces new `isEmpty()` and `isNotEmpty()` methods in
`JsonPathResultMatchers` and `JsonPathRequestMatchers` which delegate
to the new `assertValueIsEmpty()` and `assertValueIsNotEmpty()` methods
in `JsonPathExpectationsHelper`, respectively.

Issue: SPR-13352
2015-08-15 19:28:09 +02:00
Sam Brannen
4799668a98 Introduce additional JsonPath RequestMatchers in Spring MVC Test
Commit fffdd1e9e9 introduced additional
JsonPath result matchers in JsonPathResultMatchers for server-side
testing of MVC controllers.

This commit introduces comparable methods in JsonPathRequestMatchers
for client-side testing with a RestTemplate.

- isString()
- isBoolean()
- isNumber()
- isMap()

Issue: SPR-13320
2015-08-15 14:56:57 +02:00
Sam Brannen
e4f386ae1e Add regression test cases to JsonPathRequestMatchersTests 2015-08-15 14:15:13 +02:00
Sam Brannen
687af344de Polishing 2015-08-15 14:13:52 +02:00
Sam Brannen
5ee24c8482 Polish Javadoc for JsonPathRequestMatchers, etc. 2015-08-15 13:55:30 +02:00
Sam Brannen
e7c95addeb Rename test classes to avoid confusion 2015-08-15 13:33:26 +02:00
Stephane Nicoll
ae9b5c15c8 Merge pull request #857 from kazuki43zoo/SPR-12801
* pr/857:
  Add missing @since tag
2015-08-15 09:08:01 +02:00
Kazuki Shimizu
93919204a1 Add missing @since tag
Issue: SPR-12801
2015-08-15 09:07:37 +02:00
Sam Brannen
d4d5e5ce40 Polishing 2015-08-14 22:45:10 +02:00
Sam Brannen
07bb0378b9 Differentiate b/t (in)definite results in JsonPath assertions
Prior to this commit, the exists() method in JsonPathExpectationsHelper
correctly asserted that the evaluated JsonPath expression resulted in a
value (i.e., that a non-null value exists); however, if the value was
an empty array, the exists() method always threw an AssertionError.

The existing behavior makes sense if the JsonPath expression is
'indefinite' -- for example, if the expression uses a filter to select
results based on a predicate for which there is no match in the JSON
document, but the existing behavior is illogical and therefore invalid
if the JsonPath expression is 'definite' (i.e., directly references an
array in the JSON document that exists but happens to be empty). For
example, prior to this commit, the following threw an AssertionError.

    new JsonPathExpectationsHelper("$.arr").exists("{ 'arr': [] }");

Similar arguments can be made for the doesNotExist() method.

After thorough analysis of the status quo, it has become apparent that
the existing specialized treatment of arrays is a result of the fact
that the JsonPath library always returns an empty list if the path is
an 'indefinite' path that does not evaluate to a specific result.
Consult the discussion on "What is Returned When?" in the JsonPath
documentation for details:

    https://github.com/jayway/JsonPath#what-is-returned-when

This commit addresses these issues by ensuring that empty arrays are
considered existent if the JsonPath expression is definite but
nonexistent if the expression is indefinite.

Issue: SPR-13351
2015-08-14 22:07:03 +02:00
Sam Brannen
d2503340e7 Polish assertion msgs in JsonPathExpectationsHelper 2015-08-14 20:38:50 +02:00
Sam Brannen
af8d9eab59 Polish Javadoc for JsonPathExpectationsHelper 2015-08-14 17:59:12 +02:00
Sam Brannen
5a05cdbedb Consider empty arrays as existent in JsonPath assertions
Prior to this commit, a JsonPath assertion that a path expression
evaluated to an array in JsonPathExpectationsHelper (and therefore
indirectly in JsonPathResultMatchers in Spring MVC Test) would
incorrectly fail if the array was present in the JSON content but empty.

This commit fixes this issue by removing the "not empty" check for
arrays and lists.

Issue: SPR-13320
2015-08-14 17:20:07 +02:00
Sam Brannen
8afea1bc78 Add tests to JsonPathExpectationsHelperTests 2015-08-14 17:10:28 +02:00
Sam Brannen
0dbbbce8d5 Polish JsonPathResultMatchersTests 2015-08-14 17:07:23 +02:00
Sam Brannen
ecb15ac58b Polish assertion msgs in JsonPathExpectationsHelper 2015-08-14 17:04:34 +02:00
Stephane Nicoll
bad57f752a Merge pull request #856 from kazuki43zoo/SPR-13350
* pr/856:
  Fix default value of CommonsPool2TargetSource#maxWait
2015-08-14 16:34:58 +02:00
Kazuki Shimizu
9524f96405 Fix default value of CommonsPool2TargetSource#maxWait
Issue: SPR-13350
2015-08-14 16:34:32 +02:00
Sam Brannen
44a7c78753 Overhaul CauchoRemotingTests & reinstate SimpleHessianServiceExporter test 2015-08-13 21:27:49 +02:00
Sam Brannen
2c120d0d28 Clean up warnings in spring-web tests 2015-08-13 16:04:52 +02:00
Sam Brannen
be2f56262b Make FormHttpMessageConverterTests more robust 2015-08-13 15:06:39 +02:00
Rossen Stoyanchev
7defbfc18b Ensure concurrent WebSocketSession wrapper is used
Issue: SPR-13326
2015-08-13 08:00:24 -04:00
Rossen Stoyanchev
257cc63141 Restore order in AllEncompassingFormHttpMessageConverter
Issue: SPR-13309
2015-08-13 07:45:25 -04:00
Rossen Stoyanchev
28a42d1482 Polish FromHttpMessageConverterTests 2015-08-13 07:30:09 -04:00
Juergen Hoeller
3a5cc3df80 JCacheEhCache3Tests enforces EhCache 3.0's CachingProvider
Issue: SPR-13342
2015-08-12 23:09:16 +02:00