Commit Graph

12884 Commits

Author SHA1 Message Date
Rossen Stoyanchev d2e105f28d Add @Since 5.0 and package-info for reactive classes 2016-07-14 17:40:17 -04:00
Juergen Hoeller e2c7653da4 Correct parameter index boundary in exception message
Issue: SPR-14466
2016-07-14 22:29:14 +02:00
Juergen Hoeller e431624e84 CronSequenceGenerator prevents stack overflow in case of inverted range
Issue: SPR-14462
2016-07-14 21:11:28 +02:00
Juergen Hoeller 6d91d54fc9 StandardTypeConverter initializes default ConversionService against volatile field
Issue: SPR-14465
2016-07-14 21:10:24 +02:00
fisache 9aa35a8b5f Polish doc
Closes gh-1108
2016-07-14 19:15:38 +02:00
Arjen Poutsma 3e47fccf2b Propagate IOExceptions in Servlet bridge 2016-07-14 12:30:35 -04:00
Arjen Poutsma 4390cd0c2b Fixed Jaxb2CollectionHttpMessageConverterTests
- Added Woodstox before Aalto in the spring-web build, so that Woodstox
   is used as StAX implementation, and not the less featured Aalto.
 - Hardcoded Aalto dependency in XmlEventDecoder, instead of relying on
   the StAX XMLInputFactory.
2016-07-14 12:30:35 -04:00
Rossen Stoyanchev 5d1b542698 Move spring-web-reactive classes to spring-web 2016-07-14 12:30:35 -04:00
Rossen Stoyanchev 2e8326220b Move spring-web-reactive classes to spring-core 2016-07-14 12:30:30 -04:00
Rossen Stoyanchev 1022683d1c Fix compiler warnings 2016-07-14 12:18:47 -04:00
Rossen Stoyanchev cb798726bd Update build for spring-web-reactive module 2016-07-14 12:18:39 -04:00
Rob Winch 934bc4f953 Merge spring-reactive 2016-07-14 11:03:32 -05:00
Sam Brannen fd008405a1 Note in TEL: before/after test exec. callbacks don't work w/ JUnit 4 rules
Issue: SPR-4365
2016-07-14 15:46:54 +02:00
Sam Brannen 3fa88c2b56 Document suppressed exception support in TestContextManager
Issue: SPR-14459
2016-07-14 15:43:18 +02:00
nkjackzhang e2b8a786ff Polish doc
Closes gh-1110
2016-07-14 11:56:46 +02:00
Stephane Nicoll ff738e7670 Polish contribution
Closes gh-1070
2016-07-14 11:12:06 +02:00
spodgurskiy f075aac7f9 Fix MethodBasedEvaluationContext.lazyLoadArguments
This commit fix a potential `ArrayIndexOutOfBoundsException` if
`lazyLoadArguments` is called with an empty variable argument.

See gh-1070
2016-07-14 10:58:21 +02:00
Juergen Hoeller dd65689e0a MethodParameter.equals accepts subclasses pointing to same target declaration again
Issue: SPR-14438
2016-07-14 09:51:37 +02:00
Juergen Hoeller 04e9c2bf0c Aspect actually applies in PersistenceExceptionTranslationPostProcessorTests
Issue: SPR-14457
2016-07-13 22:31:41 +02:00
Juergen Hoeller adbc592f50 Unwrap JPA PersistenceException on flush failure (for Hibernate 5.2)
Issue: SPR-14457
2016-07-13 22:30:52 +02:00
Juergen Hoeller ddb4117233 HibernateExceptionTranslator converts JPA exceptions as well (for Hibernate 5.2)
Issue: SPR-14455
2016-07-13 22:24:38 +02:00
Sam Brannen adfea826cc Configure JUL/log4j for JUnit 5 in spring-test
Issue: SPR-14431
2016-07-13 22:06:46 +02:00
Sam Brannen 833deadddc Ensure test fails for the correct reason
Prior to this commit, a dynamic test in
FailingBeforeAndAfterMethodsSpringExtensionTestCase was failing but for
the wrong reason. Namely, the @Configuration class was private which
resulted in an IllegalStateException being thrown, when in fact
an AssertionFailedError was expected.

This commit addresses this by introducing an explicit check for an
AssertionFailedError.

Issue: SPR-4365
2016-07-13 21:10:47 +02:00
Sam Brannen 7ec85a3c3b Support suppressed exceptions in the TestContext framework
Prior to this commit, if multiple TestExecutionListener 'after' methods
threw an exception, only the first such exception was rethrown.
Subsequent exceptions were logged, but there was no way to access or
process them other than via the log file.

This commit addresses this shortcoming by making use of the support for
suppressed exceptions introduced in Java 7. Specifically, if multiple
TestExecutionListener 'after' methods throw an exception, the first
exception will be rethrown with subsequent exceptions suppressed in the
first one.

Issue: SPR-14459
2016-07-13 20:29:01 +02:00
Sam Brannen 5f176f50d3 Polishing 2016-07-13 18:18:40 +02:00
Sam Brannen 6162e30f3c Clean up warnings in AsyncTests 2016-07-13 16:39:49 +02:00
Juergen Hoeller 8ccd727c9a AbstractHandlerMethodMapping adds type+method info to getMappingForMethod exceptions
Issue: SPR-14452
2016-07-13 15:42:34 +02:00
Juergen Hoeller 84afc601b8 Configurable UrlPathHelper in PathExtensionContentNegotiationStrategy
This commit also aligns ResourceUrlProvider's and RequestMappingInfo's UrlPathHelper setter/getter signatures.

Issue: SPR-14454
2016-07-13 15:14:42 +02:00
Arjen Poutsma 56e50d6d68 Moved body processor to writeWithInternal()
Moved ResponseBodyProcessor creation from constructor to
writeWithInternal(), in preparation of supporting both
Publisher<DataBuffer> as well as Publisher<Publisher<DataBuffer>>.
2016-07-13 12:04:40 +02:00
Arjen Poutsma 7519d1de41 Moved log4j config to test tree
Moved log4j.properties from the main source tree to the test tree.
2016-07-13 09:56:45 +02:00
Arjen Poutsma f82f17d7f7 Moved Servlet Publisher and Processor
In preparation of supporting both Publisher<DataBuffer> and
Publisher<Publisher<DataBuffer>> as response body, moved
RequestBodyPublisher and ResponseBodyProcessor into
ServletServerHttpRequest and ServletServerHttpResponse respectively.
2016-07-13 09:53:39 +02:00
Arjen Poutsma 392a1660a4 Polishing 2016-07-13 09:53:39 +02:00
Arjen Poutsma e64907eed8 Removed ServletAsyncContextSynchronizer 2016-07-13 09:53:39 +02:00
Arjen Poutsma d2fce24eb4 Introduced ResponseBodyWriteResultPublisher
Refactored Publisher<Void> in AbstractResponseBodyProcessor into
separate ResponseBodyWriteResultPublisher.
2016-07-13 09:53:39 +02:00
Rossen Stoyanchev e91c1cd5a7 Merge pull request #1106 from darklynx/streaming_response_test 2016-07-12 17:50:40 -04:00
Rossen Stoyanchev 01a63dd84d Polish AsyncTests 2016-07-12 17:49:55 -04:00
Vladimir L 7da63c57b3 tests for asynchronous processing if controller returns StreamingResponseBody 2016-07-12 17:44:10 -04:00
Brian Clozel e906a78e0f Move server testing infrastructure to test sources 2016-07-12 17:36:30 +02:00
Sam Brannen c341b39f71 Move "What's New" reference manual chapter to the wiki
A "What's New" page has been created in the Spring Framework wiki:

https://github.com/spring-projects/spring-framework/wiki/What's-New-in-the-Spring-Framework

This commit therefore links to the new wiki page from the appendix of
the reference manual and deletes the existing "What's New" chapter from
the reference manual.

Issue: SPR-14449
2016-07-12 17:35:49 +02:00
Sam Brannen 68b3bc0394 Use Supplier<String> support in Assert in spring-test
This commit makes use of the new Supplier<String> variants of utility
methods in org.springframework.util.Assert within the spring-test
module.

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen 264f5860a8 Use Supplier<String> support in Assert in spring-core
This commit makes use of the new Supplier<String> variants of utility
methods in org.springframework.util.Assert within the spring-core
module.

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen 17dd5dd22d Introduce Supplier<String> support in Assert util
Prior to this commit, utility methods in
org.springframework.util.Assert accepted String arguments for custom
error messages. Such Strings are evaluated (e.g., concatenated)
eagerly, and for performance reasons, it was therefore not always
possible to make use of these utility methods. Consequently, there are
several places in the code base that "inline" identical functionality
in order to lazily evaluate error message concatenation and avoid an
unnecessary performance penalty. This leads to verbose code like the
following.

if (!contextPath.startsWith("/")) {
    throw new IllegalArgumentException("contextPath '" + contextPath +
    "' must start with '/'.");
}
if (contextPath.endsWith("/")) {
    throw new IllegalArgumentException("contextPath '" + contextPath +
    "' must not end with '/'.");
}

This commit addresses this shortcoming by introducing Supplier<String>
variants of all utility methods in org.springframework.util.Assert that
allow custom error messages to be evaluated lazily via a lambda
expression that is only evaluated if the assertion fails. This results
in a simplification of the previous examples as follows.

Assert.isTrue(contextPath.startsWith("/"), () -> "contextPath '" +
    contextPath + "' must start with '/'.");
Assert.isTrue(!contextPath.endsWith("/"), () -> "contextPath '" +
    contextPath + "' must not end with '/'.");

Issue: SPR-14450
2016-07-12 16:41:03 +02:00
Sam Brannen 3d4338f555 Clean up warnings in spring-core 2016-07-12 16:41:03 +02:00
Brian Clozel 147a35f4f1 Polish AntPathMatcher.setTrimTokens javadoc
Issue: SPR-14247
2016-07-12 14:47:18 +02:00
Arjen Poutsma d736245f28 Changed from interval() to intervalMillis() 2016-07-12 13:25:18 +02:00
Stephane Maldini c2c7e3b596 Polish timed operators and remove useTimer() 2016-07-12 12:13:50 +01:00
Brian Clozel 3ce49819f2 Update link to Spring CLA in CONTRIBUTING doc 2016-07-12 10:20:03 +02:00
Stephane Nicoll c425e774a3 Polish 2016-07-12 09:10:34 +02:00
Stephane Nicoll 2ee42192b3 Merge pull request #1105 from fisache:master
* pr/1105:
  Polish doc
2016-07-12 08:54:58 +02:00
fisache 55ad5a448e Polish doc
Closes gh-1105
2016-07-12 08:52:15 +02:00