Commit Graph

16449 Commits

Author SHA1 Message Date
Brian Clozel
3f85eee510 Upgrade to Netty 4.1.24.Final 2018-04-21 09:33:06 +02:00
Stephane Nicoll
bf71e86677 Delete ignored files
See gh-1799
2018-04-20 06:16:58 +02:00
Rossen Stoyanchev
b6da63aeb7 Align with 5.0.x change #cd3ed7 2018-04-19 13:50:55 -04:00
Rossen Stoyanchev
da98ff72d2 Use StringDecoder to split SSE stream
ServerSentEventHttpMessageReader had logic to split on new lines
and buffer until an empty new line (start of a new event). To account
for random data chunking, it later re-assembled the lines for each
event and split again on new lines. However bufferUntil was still
unreliable a chunk may contain nothing but a newline, which doesn't
necessarily mean an empty newline in the overall SSE stream.

This commit simplifies the above by delegating the splitting of the
stream along newlines to StringDecoder.

Issue: SPR-16744
2018-04-19 11:29:12 -04:00
Rossen Stoyanchev
30c98c8a1c Polish tests to use WebClient retrieve() 2018-04-19 09:39:34 -04:00
Daniel Kift
7eb8070d55 Polish WebFlux reference documentation 2018-04-18 12:00:53 +02:00
nkjackzhang
fb0e3e9356 Fix a typo in @Nullable Javadoc 2018-04-18 11:53:09 +02:00
Rossen Stoyanchev
06041ea4e2 Polish (minor) in AbstractMessageReaderArgumentResolver 2018-04-17 17:58:03 -04:00
Rossen Stoyanchev
babe6c59c4 Avoid creating Exception instance if not needed
Issue: SPR-16726
2018-04-17 17:58:03 -04:00
Juergen Hoeller
2f4010e8d3 Correctly delegate to OrderUtils.getPriority for DecoratingProxy
Issue: SPR-16739
2018-04-17 23:37:42 +02:00
Juergen Hoeller
d78e27f1e9 Avoid repeated superclass introspection in findAnnotation(Method,...)
Issue: SPR-16730
2018-04-17 16:44:28 +02:00
sdeleuze
568a0b5b79 Make ResponseSpec.expectBody Kotlin extension usable
Prior to this commit, due to KT-5464 type inference issue there was not
proper way to provide body expectations with WebTestClient. This commit
provides a workaround by updating the existing Kotlin extension to
return a Kotlin compatible API.

Issue: SPR-15692
2018-04-17 15:00:04 +02:00
Juergen Hoeller
51be8a7303 Workaround for generic parameter types on inner class constructors
Issue: SPR-16734
2018-04-17 14:32:54 +02:00
Juergen Hoeller
a2a8d0c754 Workaround for generic parameter types on inner class constructors
Issue: SPR-16734
2018-04-17 12:58:32 +02:00
Juergen Hoeller
d4a55a257b OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
Issue: SPR-16731
2018-04-17 11:10:15 +02:00
Juergen Hoeller
c5b524db7c Restore original MethodMapTransactionAttributeSource matching rules
Issue: SPR-16733
2018-04-17 10:56:16 +02:00
Rossen Stoyanchev
ff2228fdaf Selector header name is exposed for configuration
Issue: SPR-16732
2018-04-16 23:56:30 -04:00
Rossen Stoyanchev
586be50109 Fix typo 2018-04-16 10:02:47 -04:00
Rossen Stoyanchev
551505bd93 Restore handling of 0 bytes read
Issue: SPR-16728
2018-04-16 09:59:34 -04:00
Juergen Hoeller
0754833b37 Local XMLUnit dependency declarations with consistent version 2.5.1 2018-04-14 21:03:20 +02:00
Juergen Hoeller
de4ff4b1fc Polishing 2018-04-14 21:02:53 +02:00
Juergen Hoeller
b95e05db04 AspectJExpressionPointcut consistently resolves superinterface methods
Includes efficient check for same ClassLoader in ClassUtils.isVisible, efficient MethodMatchers check for IntroductionAwareMethodMatcher, and supertype method resolution in MethodMapTransactionAttributeSource.

Issue: SPR-16723
2018-04-14 15:10:05 +02:00
Sam Brannen
c6ed41ec47 Suppress warning in SpringFailOnTimeoutTests 2018-04-14 15:02:57 +02:00
Stephane Nicoll
19d311dcb2 Merge pull request #1791 from nkjackzhang:patch-1
* pr/1791:
  Fix typo in javadoc
2018-04-13 13:16:05 +02:00
nkjackzhang
961c641973 Fix typo in javadoc
Closes gh-1791
2018-04-13 13:15:39 +02:00
Brian Clozel
69e3fde295 Avoid duplicate Accept header values in RestTemplate
Prior to this commit, the various `HttpMessageConverter` instances
configured for a given `RestTemplate` instance could all contribute
`MediaType` values to the "Accept:" request header.

This could lead to duplicate media types in that request header,
cluttering for the HTTP request for no reason.

This commit ensures that only distinct values are added to the request.

Issue: SPR-16690
2018-04-12 22:28:31 +02:00
Juergen Hoeller
0efa7a05ad ClassUtils.isCacheSafe delegates to isVisible for resolving classes
Issue: SPR-16714
2018-04-12 20:55:26 +02:00
Juergen Hoeller
46e3a919fe Cache-safety check for sibling loaders resolving the same classes
Issue: SPR-16714
2018-04-12 18:50:32 +02:00
Brian Clozel
1fa5f03635 Upgrade to Reactor Californium SNAPSHOTs 2018-04-12 17:25:49 +02:00
Juergen Hoeller
6184c4ecc9 Consistent getTypeForFactoryMethod result for parameterized method
Issue: SPR-16720
2018-04-12 15:14:41 +02:00
Juergen Hoeller
8e1ececd97 Fine-tuned JCA MessageEndpoint exception logging and propagation
Issue: SPR-16717
2018-04-12 14:46:26 +02:00
Juergen Hoeller
7ee6130680 Revised reference example for linkable controller method signature
Issue: SPR-16710
2018-04-12 14:45:11 +02:00
sdeleuze
97ee94f4ca Expose env and context in Kotlin beans DSL
This commit introduces a deferred initialization of the declared beans
in order to make it possible to access to the environment (and even
to the context for advanced use-cases) in the beans { } Kotlin DSL.

Issues: SPR-16269, SPR-16412
2018-04-12 11:31:37 +02:00
Sam Brannen
8317f12a9b Move SpringFailOnTimeoutTests to 'statements' package 2018-04-12 11:14:08 +02:00
Sam Brannen
4f3a7dd9b4 Expand scope of SpringFailOnTimeoutTests
Issue: SPR-16716
2018-04-12 10:56:40 +02:00
Igor Suhorukov
3c34a1cb8c Throw exception from user code in SpringFailOnTimeout even if a timeout occurs
Issue: SPR-16717
2018-04-12 10:37:13 +02:00
Rossen Stoyanchev
697d2e326f Merge pull request #1785 from cakofony/iterator_allocation 2018-04-11 21:54:32 -04:00
Rossen Stoyanchev
cca78e42f1 Polish 2018-04-11 21:52:59 -04:00
Carter Kozak
e2febbdd8c Remove unnecessary iterator allocation in type handlers
HandlerMethodReturnValueHandlerComposite and
AbstractMethodMessageHandler iterate using index over collections
implementing RandomAccess to avoid unnecessary iterators.
2018-04-11 21:39:32 -04:00
Rossen Stoyanchev
5b9e7e44e0 Improve WebClient test with ParameterizedTypeReference
Issue: SPR-16715
2018-04-11 16:19:53 -04:00
Rossen Stoyanchev
224589ea74 Remove write pausing in Undertow response
Using the simple example shown in the ticket but switching from
Mono<String> to Flux<String> (and 5,000,000 onNext calls) shows that
constant pausing causes significant overhead and is not worth the
trouble vs ignoring the onWritePossible in REQUESTED state.

Issue: SPR-16702
2018-04-11 14:27:27 -04:00
Rossen Stoyanchev
3549745e37 Avoid inifinite recursion in UndertowServerHttpResponse
Undertow does not provide a way to check if we can write so with the
current implementation of isWritePossible, deep recursion can occur
when writing slows down. We now use a flag to keep track of write
ChannelListener callbacks.

This commit also addresses a related issue in
AbstractListenerWriteProcessor that went undected since #3c2d186
where after a large (single) buffer that is not written fully, the
completion signal is processed before the all data is written.

Issue: SPR-16702
2018-04-11 14:27:27 -04:00
Juergen Hoeller
e88ca0d633 Upgrade framework build to Tomcat 9.0 and Undertow 2.0
Issue: SPR-16470
2018-04-11 16:06:26 +02:00
Juergen Hoeller
e170cb0f79 Upgrade framework build to JPA 2.2 and JTA 1.3
Issue: SPR-16685
2018-04-11 16:06:10 +02:00
Juergen Hoeller
f28a5d0cf7 Proper exception for controller method return types that do not work with MvcUriComponentsBuilder (e.g. final classes)
Includes direct use of ControllerMethodInvocationInterceptor for return type Object, avoiding the attempt to generate an Object subclass.

Issue: SPR-16710
2018-04-11 16:05:54 +02:00
Juergen Hoeller
a6885c7235 Polishing 2018-04-11 16:05:35 +02:00
Andreas Asplund
6a34ca24ce Restore org.springframework.cglib.core.KeyFactoryCustomizer.class
Issue: SPR-15859
2018-04-11 15:41:40 +02:00
sdeleuze
89d069b09d Add default ctor to Reactive UrlBasedCorsConfigurationSource
Issue: SPR-16712
2018-04-11 14:38:42 +02:00
Juergen Hoeller
da80502ea6 AnnotationUtils.getAnnotation non-null check for synthesizeAnnotation
Issue: SPR-16708
2018-04-11 12:50:27 +02:00
Juergen Hoeller
61c3db0869 MethodHandles.Lookup.defineClass for CGLIB class definition purposes
Spring's CGLIB fork is patched with local copies of affected files here, introducing the notion of a "contextClass" (e.g. the proxy superclass) which gets passed through to ReflectUtils.defineClass for delegating to MethodHandles.Lookup.defineClass eventually, against a privateLookupIn(contextClass) lookup context on JDK 9/10/11.

Issue: SPR-15859
2018-04-11 12:47:55 +02:00