Commit Graph

19692 Commits

Author SHA1 Message Date
Sebastien Deleuze ff271894fe Detect unsupported suspending handler methods in Spring MVC
closes gh-23585
2019-09-04 18:24:35 +02:00
Sam Brannen f54395b261 Polish BeanUtilsTests 2019-09-04 16:53:29 +02:00
Sam Brannen 803643559a Merge branch '5.1.x' 2019-09-04 16:24:44 +02:00
Brian Clozel 0c7359911a Re-enable StreamingSimpleClientHttpRequestFactoryTests
Since the okhttp3 3.14 downgrade, we don't need to ignore this test
anymore.
2019-09-04 16:02:43 +02:00
Sam Brannen d036b5a283 Do not treat void and Void as simple types in BeanUtils
Prior to this commit, the isSimpleProperty() and isSimpleValueType()
methods in BeanUtils treated void and Void as simple types; however,
doing so does not make sense in this context, since void implies the
lack of a property or value.

This commit addresses this by explicitly excluding void and Void in the
logic in isSimpleValueType().

This commit also simplifies the implementation of
ViewResolutionResultHandler.supports(HandlerResult) to take advantage
of this change.

Closes gh-23573
2019-09-04 15:48:40 +02:00
Brian Clozel cccd9c8bb0 Fix okhttp3 downgrade 2019-09-04 15:07:17 +02:00
Brian Clozel e83fec4ec3 Downgrade to okhttp3 3.14.2
The upgrade to 4.x was breaking some behavior in our tests.
We need to reconsider this upgrade and check our mockrestserver usage in
our tests.
2019-09-04 14:51:52 +02:00
Sam Brannen 00983a1141 Update @Disabled for StreamingSimpleClientHttpRequestFactoryTests.interceptor() 2019-09-04 14:37:37 +02:00
Sam Brannen 4d819128db Fix Javadoc 2019-09-04 14:33:02 +02:00
Sam Brannen 07d4104f2f Polishing 2019-09-04 14:12:44 +02:00
Rossen Stoyanchev 310f0bfb6c Remove unnecessary code from prior commit 2019-09-04 12:59:19 +01:00
Rossen Stoyanchev dfc7540106 Add generic type bounds to DataBufferUtils methods
Closes gh-23459
2019-09-04 12:14:32 +01:00
Juergen Hoeller 48934cba1b Polishing 2019-09-04 12:19:08 +02:00
Juergen Hoeller 3bc27e8d14 Streamline AnnotationFilter usage with the MergedAnnotations API
MergedAnnotations provides 'from' variants with RepeatableContainers but without AnnotationFilter argument now, avoiding the need to refer to AnnotationFilter.PLAIN as a default at call sites.
2019-09-04 12:18:49 +02:00
Rossen Stoyanchev c8f430ee91 Change package used to test path matching
The org.reactivestreams has 13 instead of 4 classes in 1.0.3 with the
addition of Java 9 Flow adapters. This commit switches to using a
different package reactor.util.annotation, also with a small number of
classes, for this test.
2019-09-04 10:37:57 +01:00
Brian Clozel 3a132f8c3c Revert Artifactory Gradle plugin configuration
This commit reverts all artifactory configuration changes in this
branch. A new build plan has been created for the master branch which is
tailored for the latest Gradle changes made on that branch.
2019-09-04 11:21:41 +02:00
Brian Clozel 1187fea65c Fix Artifactory Gradle plugin configuration
This commit adds a missing dependency from the artifactoryPublish task
to the "install" task as POMs are currently missing from the published
artifacts and they are generated with the "install" task here.
2019-09-04 10:26:22 +02:00
Brian Clozel e26cdfe21e Fix Artifactory Gradle plugin configuration 2019-09-04 10:00:13 +02:00
Rossen Stoyanchev 57d9b92b94 Upgrade Reactor to Dysprosium RC1
Closes: gh-23579
2019-09-04 08:55:45 +01:00
Juergen Hoeller f26866e4d4 Introduce getType variant with allowFactoryBeanInit flag
Closes gh-23374
2019-09-04 00:06:23 +02:00
Juergen Hoeller eb6577755d Stackless variant of NoTransactionException for reactive flows
Closes gh-23360
2019-09-04 00:02:24 +02:00
Sebastien Deleuze d587a660fc Fix a warning in Kotlin tests 2019-09-03 23:48:39 +02:00
Sebastien Deleuze 9b33b0ad58 Rename CoroutinesUtils#invokeHandlerMethod to invokeSuspendingFunction 2019-09-03 23:41:53 +02:00
Sebastien Deleuze 2b4eb610a7 Add support for Coroutines transactions
This commit adds Coroutines extensions for
TransactionalOperator.transactional that accept suspending lambda or
Kotlin Flow parameters.

@Transactional on suspending functions is not supported yet, gh-23575
has been created for that purpose.

Closes gh-22915
2019-09-03 23:41:42 +02:00
Sam Brannen aeb857c3ba Polish ClassUtilsTests
See gh-23572
2019-09-03 17:58:54 +02:00
Sam Brannen 4575f82c72 Simplify Gradle test task configuration 2019-09-03 17:08:45 +02:00
Sam Brannen 3c4cd99237 Reintroduce Hamcrest as a global test runtime dependency
Prior to this commit, tests in spring-web and spring-webflux were no
longer executed due to the removal of the Hamcrest dependency in
commit bb03cdf5d0.
2019-09-03 17:00:26 +02:00
Sam Brannen 1c5b949df0 Fix ViewResolutionResultHandlerTests
See gh-23572
2019-09-03 16:56:50 +02:00
Sam Brannen 513ce7824f Disable StreamingSimpleClientHttpRequestFactoryTests.interceptor() test 2019-09-03 16:43:48 +02:00
Brian Clozel 1b6814402c Publish Gradle metadata
This commit enables the publishing of Gradle metadata with Spring
Framework artifacts. This feature will be enabled by default with Gradle
6.0, so Spring Framework will consistently push this information in the
5.2.x generation.

Fixes gh-23503
2019-09-03 16:17:06 +02:00
Sebastien Deleuze f8516c69bf Add Kotlin code snippets to data access refdoc
See gh-21778
2019-09-03 16:03:41 +02:00
Sam Brannen 652db21d3e Ensure Hamcrest imports are properly banned 2019-09-03 16:01:30 +02:00
Arjen Poutsma 4c863f3f83 Revise documentation on using WebClient::exchange
This commit revised the paragraph regarding the need to consume or
release the ClientResponse body when using WebClient::exchange.

Closes gh-23498
2019-09-03 15:44:02 +02:00
Arjen Poutsma 37398c669c Add toBodilessEntity to ClientResponse and WebClient.ResponseSpec
See gh-23498
2019-09-03 15:44:02 +02:00
Arjen Poutsma f5640cbfe0 Add ClientResponse::releaseBody
See gh-23498
2019-09-03 15:44:02 +02:00
Sam Brannen bc869657c8 Partially revert 670cbb9aed
... but continue to execute `Abstract*Tests` classes.
2019-09-03 15:17:34 +02:00
Sam Brannen 23d5c6e3dc Do not scan for test classes in default test task 2019-09-03 14:36:32 +02:00
Sam Brannen c78960a1ba Merge branch '5.1.x' 2019-09-03 14:21:39 +02:00
Sam Brannen f37ec90f2f Consider Void.class a primitive wrapper in ClassUtils
Prior to this commit, ClassUtils.isPrimitiveOrWrapper() and
ClassUtils.isPrimitiveWrapper() did not return true for Void.class.
However, ClassUtils.isPrimitiveOrWrapper() did return true for
void.class. This lacking symmetry is inconsistent and can lead to bugs
in reflective code.

See: https://github.com/spring-projects/spring-data-r2dbc/issues/159

This commit addresses this by adding an entry for Void.class -> void.class
in the internal primitiveWrapperTypeMap in ClassUtils.

Closes gh-23572
2019-09-03 14:02:24 +02:00
Rossen Stoyanchev 32a585d100 Merge pull request #23485 2019-09-03 12:31:36 +01:00
Rossen Stoyanchev d927d31e13 Remove reflection from ContentDispositionTests
Also minor refactoring in decoding in order to tolerate the absence of
a charset and treat as US_ASCII.

See gh-23485
2019-09-03 12:31:13 +01:00
Rossen Stoyanchev c97580035e Polish ContentDispositionTests
Closes gh-23485
2019-09-03 12:31:13 +01:00
Jonathan Bluett-Duncan f084b63286 Fix "array index out of bounds" problem reported by LGTM.com 2019-09-03 12:31:13 +01:00
Sam Brannen 670cbb9aed Simplify Gradle test task configuration
As an added bonus, AbstractViewTests is now executed in the build.
2019-09-03 12:40:59 +02:00
Sam Brannen 280a1b8880 Make AbstractWebRequestMatcherTests abstract 2019-09-03 12:13:56 +02:00
Sam Brannen 2c44eabe41 Remove unnecessary dependency declarations in spring-test 2019-09-03 12:13:56 +02:00
Sam Brannen bb03cdf5d0 Remove global test dependency on Hamcrest
Hamcrest is now only used within spring-test for MockMvc support.
2019-09-03 12:13:56 +02:00
Sam Brannen bf758eab33 Fix assertion in HandlerMethodMappingTests.unregisterMapping() 2019-09-03 12:13:56 +02:00
Sam Brannen e79bda164e Polish build.gradle 2019-09-03 12:13:10 +02:00
Sam Brannen 5fd81d2a26 Avoid deprecation warning in AbstractMockWebServerTests
MockResponse.setHeaders(Headers) is now deprecated.
2019-09-03 12:13:09 +02:00