Commit Graph

21624 Commits

Author SHA1 Message Date
Juergen Hoeller
30132b42c6 Consistent assertion messages in DefaultWebClient 2019-07-30 22:53:27 +02:00
Juergen Hoeller
3b235a098f Merge branch '5.1.x' 2019-07-30 22:52:20 +02:00
Juergen Hoeller
59064f0780 Upgrade to Undertow 2.0.23 and Apache Johnzon 1.1.12 2019-07-30 22:27:09 +02:00
Juergen Hoeller
960079e5f5 Retain non-null HttpStatus return value in Client(Http)Response
See gh-23366
2019-07-30 22:26:46 +02:00
Arjen Poutsma
ac9a11a581 Merge branch '5.1.x' 2019-07-30 18:03:01 +02:00
Arjen Poutsma
29ef985411 Add support for non-standard status codes
Added support for status codes that do not occur in HttpStatus in
DefaultClientResponseBuilder and made ClientResponse::statusCode
ClientHttpResponse::getStatusCode @Nullable.

Closed gh-23366
2019-07-30 17:44:47 +02:00
Juergen Hoeller
27aaad5a89 Add isTooEarly() method to StatusResultMatchers
See gh-23384
2019-07-30 17:37:26 +02:00
Juergen Hoeller
4f3b89e907 Adapt MethodParameterTests to AssertJ usage on master
See gh-23352
2019-07-30 17:36:02 +02:00
Juergen Hoeller
8ef557df2f Merge branch '5.1.x' 2019-07-30 17:34:29 +02:00
Rossen Stoyanchev
5e15bbfbf1 Change order of argument for createPayload
Expecting data first and metadata second aligns better with the single
arg variant that accepts data. This is also consistent with the
RSocket API in the create methods of ByteBufPayload and DefaultPayload.
2019-07-30 16:16:30 +01:00
Rossen Stoyanchev
a1a8781279 PayloadUtils improvements and tests 2019-07-30 16:16:30 +01:00
Juergen Hoeller
b2c56590dd Upgrade to Netty 4.1.38 and Checkstyle 8.23 2019-07-30 16:59:23 +02:00
Juergen Hoeller
c4622dbebc Polishing 2019-07-30 16:59:01 +02:00
Juergen Hoeller
9a36027ae1 MethodParameter.equals checks nesting level and containing class
Closes gh-23352
2019-07-30 16:58:45 +02:00
Juergen Hoeller
22e87ac143 Polishing 2019-07-30 16:05:18 +02:00
Juergen Hoeller
cc57506474 Add status code 425 ("Too Early") to HttpStatus enum
Closes gh-23384
2019-07-30 16:05:00 +02:00
Arjen Poutsma
571f6adb35 Merge branch '5.1.x' 2019-07-30 15:46:27 +02:00
Arjen Poutsma
6cb4b8bd43 Add onRawStatus to WebClient
- Add onRawStatus to WebClient.ResponseSpec, allowing users to deal with
  raw status codes that are not in HttpStatus.
- No longer throw an exception status codes not in HttpStatus.

Closes gh-23367
2019-07-30 15:10:33 +02:00
Rossen Stoyanchev
9648b1c2c6 Merge branch '5.1.x' 2019-07-30 12:06:39 +01:00
Rossen Stoyanchev
7b697266be PathPatternParser allows '-' in variables
The isJavaIdentifier check is not really required, but also seems
intuitive for variables to be Java identifier-like. This commit relaxes
the constraint a bit by also allowing "-".

Closes gh-23101
2019-07-30 12:04:47 +01:00
Rossen Stoyanchev
d972911d51 Merge branch '5.1.x' 2019-07-30 11:02:33 +01:00
Rossen Stoyanchev
1d92755cc7 Remove custom handling of byte[] in DefaultStompSession
Closes gh-23358
2019-07-30 10:52:51 +01:00
Stephane Nicoll
ee03a18e61 Merge branch '5.1.x' 2019-07-30 10:55:12 +02:00
Stephane Maldini
50a909908c Remove unnecessary flushOnEach (since reactor-netty 0.9) 2019-07-30 10:54:51 +02:00
Stephane Nicoll
5c860afa55 Upgrade to Reactor Dysprosium-M3 2019-07-30 09:54:20 +02:00
Stephane Nicoll
c9340ecabc Merge branch '5.1.x' 2019-07-30 09:52:19 +02:00
Stephane Nicoll
da54121ee0 Upgrade to Reactor Californium-SR10 2019-07-30 09:51:32 +02:00
Stephane Nicoll
535bb16c28 Merge pull request #23382 from izeye
* pr/23382:
  Remove duplicate assertion in matchWithNullPath()

Closes gh-23382
2019-07-30 09:38:04 +02:00
Johnny Lim
bccc7a62f4 Remove duplicate assertion in matchWithNullPath()
See gh-23382
2019-07-30 09:37:50 +02:00
Rossen Stoyanchev
2c878e9331 Support for setupPayload in RSocketRequester
Closes gh-23368
2019-07-29 22:09:06 +01:00
Rossen Stoyanchev
55946bf319 Factor out MetadataEncoder from RSocketRequester
To be re-used also for creating metadata for the setup payload.

See: gh-23368
2019-07-29 22:09:06 +01:00
Rossen Stoyanchev
c76370d7d8 Polish 2019-07-29 22:09:02 +01:00
Rossen Stoyanchev
dc0c730ee8 DefaultMetadataExtractor refactoring 2019-07-29 22:08:26 +01:00
Rossen Stoyanchev
2aa3363ba2 ClientRSocketFactoryConfigurer refactoring 2019-07-29 22:08:07 +01:00
Sam Brannen
027fd78306 Further refine @TestPropertySource merged annotation calls
See gh-23320
2019-07-29 22:53:15 +02:00
Phillip Webb
c9479ff20f Refine @TestPropertySource merged annotation calls
See gh-23320
2019-07-29 22:53:00 +02:00
Sam Brannen
1f8abef2ce Upgrade to AssertJ 3.13.1 2019-07-29 14:22:40 +02:00
Sam Brannen
0ac1a3754e Upgrade to AssertJ 3.13.0 2019-07-29 10:10:12 +02:00
Sam Brannen
c72bf10eb9 Polish MergedSqlConfig 2019-07-28 18:41:26 +02:00
Sam Brannen
f53cdb8bd2 Introduce common SimpleUrlHandlerMapping constructors
Prior to this commit, the SimpleUrlHandlerMapping classes in Spring MVC
and Spring Webflux only had default constructors. This lead to the fact
that users often had to explicitly invoke setUrlMap() and setOrder() on
the newly instantiated SimpleUrlHandlerMapping.

In order to simplify the programmatic setup of a SimpleUrlHandlerMapping
in common scenarios, this commit introduces the following constructors.

- SimpleUrlHandlerMapping()
- SimpleUrlHandlerMapping(Map<String, ?> urlMap)
- SimpleUrlHandlerMapping(Map<String, ?> urlMap, int order)

Closes gh-23362
2019-07-28 17:59:19 +02:00
Sam Brannen
0a822ddf2d Fix typo in reference manual 2019-07-28 16:36:12 +02:00
Sam Brannen
bfbe8f8780 Polish MergedTestPropertySources 2019-07-28 15:40:39 +02:00
Sam Brannen
a37eaf75c4 Verify meta @TestPropertySource overrides meta-meta declaration
This commit introduces tests which verify that properties configured via
@TestPropertySource used as a meta-annotation override those configured
via @TestPropertySource used as a meta-meta-annotation.

See gh-23320
2019-07-28 12:35:57 +02:00
Sam Brannen
1954861844 Update @TestPropertySource Javadoc regarding "local" semantics
See gh-23320
2019-07-28 12:12:28 +02:00
Sam Brannen
690694df33 Merge branch 'sbrannen/issues/gh-23320-repeatable-TestPropertySource' 2019-07-27 23:08:50 +02:00
Sam Brannen
1075bae280 Document repeatable @TestPropertySource support in reference manual
See gh-23320
2019-07-27 23:02:43 +02:00
Sam Brannen
136af0b164 Overhaul repeatable @TestPropertySource support
Prior to this commit, if multiple, directly present
`@TestPropertySource` annotations declared the same property, the
precedence ordering was top-down instead of bottom-up, in contrast to
the semantics for class hierarchies. In other words, a subsequent
`@TestPropertySource` annotation could not override a property in a
previous `@TestPropertySource` annotation.

This commit overhauls the internals of `TestPropertySourceUtils` in
order to provide proper support for property overrides within local,
directly present `@TestPropertySource` declarations.

Specifically, the `locations` and `properties` attributes from all
`@TestPropertySource` declarations that are directly present or
meta-present on a given class are now merged into a single instance of
`TestPropertySourceAttributes` internally, with assertions in place to
ensure that such "same level" `@TestPropertySource` declarations do not
configure different values for the `inheritLocations` and
`inheritProperties` flags. Effectively, all "same level"
`@TestPropertySource` declarations are treated internally as if there
were only one such annotation declared by the user.

See gh-23320
2019-07-27 22:30:34 +02:00
Anatoliy Korovin
2e476ca14f Support @TestPropertySource as a repeatable annotation
Prior to this commit, @TestPropertySource could not be declared as a
repeatable annotation. In addition, a local declaration of
@TestPropertySource would silently override a meta-present
@TestPropertySource.

This commit addresses this issue by introducing @TestPropertySources as
a container for @TestPropertySource. This commit also updates the
search and algorithms within TestPropertySourceUtils.

Closes gh-23320
2019-07-27 22:27:30 +02:00
Rossen Stoyanchev
8574f977a2 Mutate RSocketStrategies in RSocketMessageHandler
Use rsocketStrategies field with mutate() to ensure consistency
with internal state.

Remove transparent initialization of decoders in MetadataExtractor
and expect them to be set to avoid unintended side effects.
2019-07-26 16:12:02 +01:00
Rossen Stoyanchev
fab0a5d504 MetadataExtractor refactoring
Remove RSocketStrategies argument from the contract to avoid having to
pass them every time especially by application components, like an
implementation of a Spring Security matcher.

Decouple DefaultMetadataExtractor from RSocketStrategies in favor of
a decoders property and an internal DataBufferFactory, which does not
need to be the shared one as we're only wrapping ByteBufs.
2019-07-26 16:12:02 +01:00