Commit Graph

1797 Commits

Author SHA1 Message Date
Rossen Stoyanchev
6e7da62085 Switch to Reactor snapshots and remove workaround
Following the 5.2 M1 release we can switch back to Reactor snapshots
and remove the workaround for a fix coming in Reactor Core 3.2.9.
2019-04-10 16:09:28 -04:00
Rossen Stoyanchev
bb28477587 Merge branch '5.1.x' 2019-04-10 15:37:02 -04:00
Rossen Stoyanchev
bd2c213b47 Remove buffer release used as workaround
The extra buffer release was used as a workaround for a reactor core
issue and should have already been removed as part of
b3bc2d9253.
2019-04-10 15:36:36 -04:00
Rossen Stoyanchev
3ebbfa2191 Fix refCount issue in LeakAwareDataBuffer
LeakAwareDataBuffer was keeping its own refCount rather than checking
through the delegate. This leads to false leak reports in a sequence
where an allocated buffer is retained and then sliced since it is not
aware of the changes to the refCount through the slice.
2019-04-10 15:33:19 -04:00
Rossen Stoyanchev
d707d382b4 Merge branch '5.1.x' 2019-04-09 22:38:15 -04:00
Rossen Stoyanchev
b11e7feff6 Polish during review of DataBuffer handling 2019-04-09 22:19:05 -04:00
Juergen Hoeller
dc14ea86eb Fix regression for nested AnnotationAttributes.annotationType() result
See gh-22738
2019-04-09 09:40:53 +02:00
Juergen Hoeller
4ec9aff01d Polishing 2019-04-08 19:59:06 +02:00
Sam Brannen
bd414df944 Remove JMXMP from TestGroup
Due to the changes in a7425c81c0, we no
longer need to execute tests using the JMXMP protocol in PERFORMANCE
builds.

This commit removes the JMXMP constant from the TestGroup enum and
updates affected tests, thereby effectively including such tests in
the standard build from now on.

See gh-22757
2019-04-08 17:05:16 +02:00
Juergen Hoeller
fd8fa301a6 Consistent non-exposure of inherited annotations in AnnotationMetadata
Closes gh-22766
2019-04-08 15:59:06 +02:00
Sebastien Deleuze
2e7ed915cd Merge branch '5.1.x' 2019-04-08 15:46:47 +02:00
Juergen Hoeller
43cb1af26a Polishing 2019-04-08 15:33:26 +02:00
Phillip Webb
e905f1712e Refine MergedAnnotation.asMap
Add a convenience method that allows a `MergedAnnotation` to be
converted into an `AnnotationAttributes` instance. Also rename
the `MapValues` enum to `Adapt` which generally seems to read
better.

Closes gh-22738
2019-04-05 13:22:18 -07:00
Phillip Webb
ef151f578d Polishing 2019-04-05 13:22:18 -07:00
Phillip Webb
1221b0650b Add MissingMergedAnnotation Tests
Add tests for `MissingMergedAnnotation`

See gh-21697
2019-04-05 13:21:46 -07:00
Phillip Webb
8bc74ad18d Delete AnnotationAttributeExtractor
Delete `AnnotationAttributeExtractor` which is package private and
no longer used.

Closes gh-22753
2019-04-05 13:20:47 -07:00
Sam Brannen
e4525cf4c1 Modify ByteArrayEncoder so that it works in Eclipse IDE 2019-04-05 19:55:22 +02:00
Sebastien Deleuze
a8d6ba9965 Add support for Coroutines Flow
Flow is a Kotlin Coroutines related cold asynchronous
stream of the data, that emits from zero to N (where N
can be unbounded) values and completes normally or with
an exception.

It is conceptually the Coroutines equivalent of Flux with
an extension oriented API design, easy custom operator
capabilities and some suspending methods.

This commit leverages Flow <-> Flux interoperability
to support Flow on controller handler method parameters
or return values, and also adds Flow based extensions to
WebFlux.fn. It allows to reach a point when we can consider
Spring Framework officially supports Coroutines even if some
additional work remains to be done like adding
interoperability between Reactor and Coroutines contexts.

Flow is currently an experimental API that is expected to
become final before Spring Framework 5.2 GA.

Close gh-19975
2019-04-04 19:06:32 +02:00
stsypanov
383f18e214 Use StringJoiner where possible to simplify String joining 2019-04-04 16:11:32 +02:00
Arjen Poutsma
b3d3778269 Do not resolve DTDs in Stax Tests 2019-04-04 12:10:10 +02:00
Juergen Hoeller
52f90c303e Rename LogMessage.lazy(Supplier) to LogMessage.of(Supplier)
See gh-22726
2019-04-04 10:39:42 +02:00
Juergen Hoeller
9080ae24f9 First-class support for printf-style format strings in LogMessage
LogMessage is an abstract class now: with internal subclasses for Supplier bindings as well as printf-style format strings with a variable number of arguments (some fixed for efficiency, varargs array as fallback), created through corresponding static factory methods.

Closes gh-22726
2019-04-04 01:52:51 +02:00
Rossen Stoyanchev
88a7a68a71 Revert to Californium-SR6 for M1 release 2019-04-03 19:25:34 -04:00
Rossen Stoyanchev
2c28e4e972 Merge branch '5.1.x' 2019-04-03 16:29:28 -04:00
Rossen Stoyanchev
b3bc2d9253 Remove workaround for reactor-core issue 2019-04-03 16:27:02 -04:00
Rossen Stoyanchev
72119ac076 ProducesRequestCondition caches accepted media types
Closes gh-22644
2019-04-03 14:56:30 -04:00
Juergen Hoeller
8f967129b9 Merge branch '5.1.x' 2019-04-03 19:05:42 +02:00
Juergen Hoeller
0cc6a9ef11 Avoid getDeclaredMethod check in ReflectionUtils.isObjectMethod
Closes gh-22730
2019-04-03 18:21:26 +02:00
Sam Brannen
807828b2b7 Polish Javadoc for MergedAnnotation support
See gh-21697
2019-04-03 16:55:34 +02:00
Sam Brannen
a4279c5d00 Rename MergedAnnotations.SearchStrategy.SUPER_CLASS to SUPERCLASS
For consistency within the framework, this commit renames the SUPER_CLASS enum constant
to SUPERCLASS.

See gh-21697
2019-04-03 16:44:36 +02:00
Juergen Hoeller
e2e91e2196 Switch LogAccessor argument order to have message supplier last
Closes gh-22726
2019-04-02 21:01:56 +02:00
Juergen Hoeller
2e63c66b0d Merge branch '5.1.x' 2019-04-02 20:13:29 +02:00
Juergen Hoeller
0babc1fb64 Polishing 2019-04-02 20:04:07 +02:00
Juergen Hoeller
3ac88bed23 Introduce LogAccessor and LogMessage as convenient logging utilities
Closes gh-22726
2019-04-02 19:13:05 +02:00
Sam Brannen
085cb1dd92 Clean up warnings 2019-03-31 14:36:35 +02:00
Rossen Stoyanchev
6c33af0a1c Merge branch '5.1.x' 2019-03-29 15:56:07 -04:00
Rossen Stoyanchev
85332c7a49 Polish 2019-03-29 15:53:45 -04:00
Rossen Stoyanchev
81f95efdbb Call onDispose before first read
The cancellation callback in asynchronousReadFileChannel must be called
before the first read I/O or otherwise if cancellation signals happens
immediately the onDispose callback may be missed.

The DefaultBufferFactory workaround however remains in place until an
expected additional fix arrives with Reactor Core 3.2.9.

See gh-22107
2019-03-29 15:43:06 -04:00
Rossen Stoyanchev
9a1bba5b67 NettyDataBufferFactory.wrap(ByteBuf) calls touch()
Closes gh-21960
2019-03-29 15:25:28 -04:00
Juergen Hoeller
57de2e0900 Deprecate ClassUtils.isCglibProxy methods in favor of AOP-level checks
Closes gh-22706
2019-03-29 11:12:49 +01:00
Phillip Webb
f273fa990c Use RepeatableContainers.none() in AnnotationUtils
Update `AnnotationUtils` so that `RepeatableContainers.none()` is used
when performing an exhaustive search for merged annotations. These
parameters were accidentally removed in commit 210b1789 and weren't
caught earlier because we were missing a test.

Closes gh-22702
2019-03-28 14:39:29 -07:00
Phillip Webb
800cbf2524 Ignore 'value' attribute in AnnotationTypeMapping
Update `addConventionAnnotationValues` so that `value` attributes
do not override existing annotation values. The aligns the new
`MergedAnnotations` API with the previous `AnnotatedElementUtils`
logic.

Closes gh-22703
2019-03-28 14:39:29 -07:00
Rossen Stoyanchev
45e42214b2 Merge branch '5.1.x' 2019-03-28 17:37:21 -04:00
Rossen Stoyanchev
57d006b3ff Fix checkstyle warning 2019-03-28 17:37:12 -04:00
Rossen Stoyanchev
52b109ae68 Merge branch '5.1.x' 2019-03-28 17:19:51 -04:00
Rossen Stoyanchev
beae1fbb12 Uncomment buffer leak tests in DataBufferUtils
Following a response on
https://github.com/reactor/reactor-core/issues/1634 apparently
FluxSink is respecting doOnDiscard but there is a race condition
in DataBufferUtils with file reading.

This commit makes two changes:
1) Add more checks for onDispose to detect cancellation signals
as well as to deal with potentially concurrent such signal.
2) Do not close the channel through the Flux.using callback but
rather allow the current I/O callback to take place and only then
close the channel or else the buffer is left hanging.

Despite this tests still can fail due to a suspected issue in Reactor
itself with the doOnDiscard callback for FluxSink. That's tracked under
the same issue https://github.com/reactor/reactor-core/issues/1634
and for now the use of DefaultDataBufferFactory is enforced as a
workaround until the issue is resolved.

See gh-22107
2019-03-28 17:18:40 -04:00
Sam Brannen
3f85530efd URL Cleanup - polishing 2019-03-28 17:23:13 +01:00
Juergen Hoeller
49fccfb158 Consistent retrieval of javax annotation types (e.g. JSR-305)
Closes gh-22696
2019-03-28 14:38:55 +01:00
Sam Brannen
025eaf688f Clean up warnings in Gradle build output 2019-03-28 12:32:58 +01:00
Sebastien Deleuze
811f315440 Refine PropertyResolver extensions null-safety
See gh-22687
2019-03-28 09:01:20 +01:00