Commit Graph

15352 Commits

Author SHA1 Message Date
Stephane Maldini 21203921f0 sync with reactor-core snapshot 2017-09-22 13:56:39 -07:00
Stephane Maldini 90f4b13767 update to Bismuth-BUILD-SNAPSHOT 2017-09-22 13:50:44 -07:00
Rossen Stoyanchev ed10cab9d3 Remove DispatcherHandler static factory methods
The typical way to load DispatcherHandler is to use
WebHttpHandlerBuilder#applicationContext which also detecs filters,
exception handlers, as well as other beans that are injected into every
ServerWebExchange -- custom session manager, localecontext resolver,
codecs for form data, multipart data, etc

WebHttpHandlerBuilder is the preferred and way so removing the ones on
DispatcherHandler. They could always be added back later.
2017-09-22 16:24:39 -04:00
Rossen Stoyanchev c28a6357c5 DispatcherHandler alignment with DispatcherServlet
Issue: SPR-15934
2017-09-22 15:44:12 -04:00
Rossen Stoyanchev 816a58fcf9 RouterFunctionMapping provides getter for RouterFunction
Issue: SPR-15991
2017-09-22 15:15:41 -04:00
Rossen Stoyanchev 31619b3ffb DispatcherHandler orders HandlerMappings correctly again
Issue: SPR-15991
2017-09-22 15:06:23 -04:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Brian Clozel 60f47f4489 Fix memory leak in reactive multipart parser 2017-09-22 17:03:38 +02:00
Arjen Poutsma 4fbf86e5ce Javadoc 2017-09-22 14:17:51 +02:00
Arjen Poutsma 2841ef5d05 Introduce RouterFunction visitor
This commit introduces a visitor for router functions
(RouterFunctions.Visitor), allowing to iterate over all the components
that make up a router function.

This commit also introduces a ToStringVisitor, which creates a nicely
formatted string for use with toString().

Issue: SPR-15711, SPR-15711
2017-09-22 14:03:09 +02:00
Sebastien Deleuze 7b6f1d1b58 Use compileOnly and testCompileOnly for JSR 305 JAR
This change avoids error messages in logs during test classes
compilation which are using @NonNull and @Nullable.
2017-09-22 13:44:42 +02:00
Sebastien Deleuze d8e52c0413 Refine BeanUtils#findPrimaryConstructor behavior
Issue: SPR-15673
2017-09-22 13:40:37 +02:00
Jason Yu 78434c8e20 Release DataBuffers in FreeMarkerView
When template processing throws an exception, we must ensure that
`DataBuffers` are properly released to avoid memory leaks.

Issue: SPR-15966
2017-09-22 10:08:18 +02:00
Sebastien Deleuze 7c18e4b115 Polish null-safety documentation
Issue: SPR-15756
2017-09-22 09:45:58 +02:00
Sebastien Deleuze 6c4a103f70 Remove support for generics nullability for now
See https://github.com/Kotlin/KEEP/issues/79
2017-09-21 18:44:27 +02:00
Rossen Stoyanchev 819ca0dbd4 Expose getters for the configured HandlerMapping's
Issue: SPR-15934
2017-09-21 09:46:26 -04:00
Juergen Hoeller c9afdce54b Merge pull request #1532 from aahlenst/spr-15988
ProtobufHttpMessageConverter: Ensure that JSON is written to response body
2017-09-21 12:45:49 +02:00
Andreas Ahlenstorf b30f6fd991 Ensure that JSON is written to response body
Issue: SPR-15988
2017-09-21 12:19:35 +02:00
Juergen Hoeller 15c82afc1c Consistent conversion of Optional array/list arrangements
Issue: SPR-15918
Issue: SPR-15919
Issue: SPR-15676
2017-09-20 18:28:49 +02:00
Juergen Hoeller ea01c4113a Revisit MockPart constructors
Issue: SPR-15854
2017-09-20 10:55:06 +02:00
Juergen Hoeller 4cbef27f90 Consistent tolerance of unknown HTTP status codes behind RestTemplate
Issue: SPR-15978
2017-09-20 10:54:58 +02:00
Juergen Hoeller 215e5f5682 Defensively call getParameterType (which might fail for certain statements)
Issue: SPR-15977
2017-09-20 10:54:49 +02:00
Juergen Hoeller ffe80ff002 Clarify @Bean return type recommendation in case of multiple interfaces
Issue: SPR-15973
2017-09-20 10:54:23 +02:00
Stephane Nicoll 7b48e60c81 Merge pull request #1531 from xavier630:patch-1
* pr/1531:
  Fix Javadoc typo
2017-09-20 09:31:11 +02:00
Xavier Downs dba1ef0b26 Fix Javadoc typo
Closes gh-1531
2017-09-20 09:30:37 +02:00
Juergen Hoeller 80134d2e0c Automatic-Module-Name manifest entries for Jigsaw
Includes upgrade to Jetty 9.4.7 GA.

Issue: SPR-13716
2017-09-19 15:35:10 +02:00
Juergen Hoeller 185c2bf5b6 Upgrade to ASM 6.0
Issue: SPR-14514
2017-09-19 13:49:32 +02:00
Juergen Hoeller ac9cfefaff TaskExecutorRegistration does not apply its default settings to a user-provided executor
Also, ChannelRegistration.setInterceptors is deprecated now: in favor of a fluently named interceptors(...) method which is documented to add the given interceptors to the channel's current list.

Issue: SPR-15962
Issue: SPR-15976
2017-09-19 13:47:43 +02:00
Juergen Hoeller 5bdcb895c0 HttpEntityMethodProcessor lets entity headers override existing headers (again)
Issue: SPR-15952
2017-09-19 13:47:30 +02:00
Sebastien Deleuze 8caeb33974 Polish Kotlin reference documentation 2017-09-19 13:34:21 +02:00
Juergen Hoeller 3bd2154046 Polishing 2017-09-19 00:02:40 +02:00
Juergen Hoeller 0f42f38336 Drop Animal Sniffer setup (and upgrade to RxJava 1.3.2) 2017-09-19 00:02:19 +02:00
Juergen Hoeller 346d2edce1 Revised org.springframework.lang javadoc
Issue: SPR-15756
2017-09-18 23:59:11 +02:00
Juergen Hoeller 1f3967cb3c spring-jcl provides NoOpLog and SimpleLog as well
Issue: SPR-15957
2017-09-18 23:57:44 +02:00
Sebastien Deleuze 825449a3d2 Introduce a link to go back to refdoc index 2017-09-18 15:23:26 +02:00
Stephane Nicoll cad51d1251 Merge pull request #1530 from qwazer:rename_fix
* pr/1530:
  Fix class name in javadoc
2017-09-18 14:28:58 +02:00
areshetnikov 0f0b8dc745 Fix class name in javadoc
Closes gh-1530
2017-09-18 14:28:37 +02:00
Stephane Nicoll b275a06d16 Reuse JmsTemplate's MessageConverter in JmsMessagingTemplate
This commit makes sure that any custom MessageConverter set in a
JmsTemplate used by a JmsMessagingTemplate is reused as the payload
converter of the message.

Issue: SPR-15965
2017-09-18 14:27:47 +02:00
Stephane Nicoll 7aa956a920 Polish 2017-09-18 14:06:31 +02:00
Sebastien Deleuze c5ba55ffc2 Polish null-safety documentation
Issue: SPR-15756
2017-09-15 18:06:58 +02:00
Arjen Poutsma a7617a2641 Introduce WebFluxUriComponentsBuilder
This commit introduces the WebFluxUriComponentsBuilder, with a single
method that creates a UriComponentsBuilder for a ServerRequest. More
methods to be added by @rstoyanchev.

Issue: SPR-15953
2017-09-15 14:14:39 +02:00
Arjen Poutsma 2fb3eeba6f Introduce ServerRequest.methodName()
This commit introduces a methodName() method to the ServerRequest,
returning the String name of the method. This method is useful for
non-standard HTTP methods.
2017-09-15 14:14:39 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Violeta Georgieva ec2218c967 AbstractListenerWriteFlushProcessor: Ensure the last flush will be performed
When writing Publisher<Publisher<T>>, a flush operation is performed onComplete
for every Publisher. If the flush operation is not able to be performed immediately
it will be retried before starting to process data provided by the next Publisher.
For the last Publisher the implementation needs to ensure that the flush will
be performed only then whole operation will complete.

Issue: SPR-15949
2017-09-15 08:53:00 +02:00
Arjen Poutsma 2510db0683 Javadoc 2017-09-14 17:23:25 +02:00
Arjen Poutsma e70210a1da Introduce ForwardedHeaderFilter for WebFlux
This commit introduces a ForwardedHeaderFilter for WebFlux, similar to
the existing Servlet version. As part of this the
DefaultServerHttpRequestBuilder had to be changed to no longer use
delegation, but instead use a deep copy at the point of mutate().
Otherwise, headers could not be removed.

Issue: SPR-15954
2017-09-14 16:27:12 +02:00
Juergen Hoeller 69af698ceb Latest dependency updates (EclipseLink 2.7 final, Hibernate ORM 5.2.11, Selenium 3.5.3) 2017-09-14 15:16:53 +02:00
Brian Clozel 81125de697 Fix error responses handling in WebClient
This commit fixes a typo in the `DefaultWebClient` implementation.
Instead of forwarding resolved `WebClientException` instances as error
signals, the `bodyToMono(ParameterizedTypeReference)` variant would just
forward those exceptions as `onNext` signals.

Issue: SPR-15946
2017-09-14 14:15:05 +02:00
Brian Clozel 98b6491f0c Send error signal also for empty server responses
Prior to that commit, the `ResponseSpec` `WebClient` would process error
responses (4xx, 5xx HTTP status) and transform those into error signals
with a `WebClientResponseException`. But this would only work if the
HTTP response would have a non-empty response body.

An empty error response would not send an error signal and only
translate in an `onComplete` signal.

This commit fixes this behavior and makes sure that this error signal is
sent in all cases.

Issue: SPR-15946
2017-09-13 10:56:57 +02:00
Brian Clozel aa19912e00 Polish 2017-09-13 10:51:13 +02:00