Commit Graph

1015 Commits

Author SHA1 Message Date
Sebastien Deleuze
cbd98d5247 Switch back to Reactor BOM Aluminium-BUILD-SNAPSHOT 2017-03-29 16:41:54 +02:00
stonio
90388e4701 Replace size() check with isEmpty()
Closes gh-1333
2017-03-27 15:34:23 +02:00
Rossen Stoyanchev
0662dbf044 String decoding for text only vs any MIME type
Follow-up to:
3d68c496f1

StringDecoder can be created in text-only vs "*/*" mode which in turn
allows a more intuitive order of client side decoders, e.g. SSE does
not have to be ahead of StringDecoder.

The commit also explicitly disables String from the supported types in
Jackson2Decoder leaving it to the StringDecoder in "*/*" mode which
comes after. This does not change the current arrangement since the
the StringDecoder ahead having "*/*" picks up JSON content just the
same.

From a broader perspective this change allows any decoder to deal with
String if it wants to after examining the content type be it the SSE
or another, custom decoder. For Jackson there is very little value in
decoding to String which works only if the output contains a single
JSON string but will fail to parse anything else (JSON object/array)
while StringDecoder in "*/*" mode will not fail.

Issue: SPR-15374
2017-03-23 16:53:06 -04:00
Rossen Stoyanchev
3d68c496f1 String encoding for any MIME type
CharSequenceEncoder now supports all MIME types, however since encoding
Flux<String> can overlap with other encoders (e.g. SSE) there are now
two ways to create a CharSequenceEncoder -- with support for text/plain
only or with support for any MIME type.

In WebFlux configuration we insert one CharSequenceEncoder for
text/plain (as we have so far) and a second instance with support for
any MIME type at the very end.

Issue: SPR-15374
2017-03-22 18:01:32 -04:00
Juergen Hoeller
e892e02f41 Polishing 2017-03-21 17:44:47 +01:00
Rossen Stoyanchev
c8671041f1 EncoderHttpMessageWriter supports streaming MediaTypes
Support for flushing in EncoderHttpMessageWriter is now driven from a
configurable list of "streaming" media types with the list including
"application/stream+json" by default.

As a result Jackson2ServerHttpMessageWriter is no longer needed.
2017-03-21 10:15:56 -04:00
Rossen Stoyanchev
6f075c9060 Update after changed method in Reactor Core 2017-03-20 21:57:17 -04:00
Juergen Hoeller
ab7db413c6 DefaultResponseErrorHandler delegate methods declared as protected
Also revises copyToByteArray/String in FileCopyUtils/StreamUtils for lenient null handling.

Issue: SPR-15329
2017-03-16 18:57:13 +01:00
Juergen Hoeller
012c56a1f0 Avoid pattern misdetection in Tomcat "war:" URL separator
Issue: SPR-15332
2017-03-16 18:55:49 +01:00
Juergen Hoeller
899f235998 Detect Tomcat's "war" protocol as jar URL
Issue: SPR-15332
2017-03-14 15:19:02 +01:00
Brian Clozel
b799013567 Update to Reactor Aluminium SNAPSHOT
Currently the BOM versions are:

* reactor-core 3.0.6.BUILD-SNAPSHOT
* reactor-netty 0.6.2.BUILD-SNAPSHOT

This commit fixes as well a few deprecations in reactor-core.
2017-03-10 15:20:40 +01:00
Arjen Poutsma
63118c1ea7 Add DataBufferUtils.read w/ AsynchFileChannel
This commit adds an overloaded DataBufferUtils.read method that operates
on a AsynchronousFileChannel (as opposed to a ReadableByteChannel, which
already existed). This commit also uses said method in the Resource
encoders, if the Resource is a file.
2017-03-09 14:08:40 +01:00
Juergen Hoeller
94a7624c1f Polishing 2017-03-07 15:42:04 +01:00
Juergen Hoeller
8992f5924f AnnotationUtils makes use of Java 8 getDeclaredAnnotation method
Issue: SPR-15287
2017-02-28 13:07:03 +01:00
Juergen Hoeller
cbd19153c4 Polishing 2017-02-22 16:53:54 +01:00
stonio
7d062df992 Use String#isEmpty()
Closes gh-1335
2017-02-22 11:55:17 +01:00
Juergen Hoeller
45df1d9fea Javadoc fixes 2017-02-18 01:43:30 +01:00
Juergen Hoeller
f90cd7705f Consistent ordering of Assert variants
Issue: SPR-15196
2017-02-16 15:32:07 +01:00
Juergen Hoeller
22322fde26 Revised isInstanceOf/isAssignable message concatenation
Issue: SPR-15196
2017-02-16 13:13:20 +01:00
Juergen Hoeller
50d93d3794 Consistently support CompletionStage next to CompletableFuture
Issue: SPR-15258
2017-02-15 23:16:11 +01:00
Juergen Hoeller
5f531a7a7d Comparators entry point with generically typed factory methods
Issue: SPR-14779
2017-02-15 18:05:32 +01:00
Juergen Hoeller
44ec6e0037 Polishing 2017-02-13 15:07:07 +01:00
Sebastien Deleuze
ef550c43d6 Flush JSON stream after each element
Issue: SPR-15104
2017-02-13 14:20:19 +01:00
Juergen Hoeller
448ea4cdfe Consistent logging in ignoreResourceNotFound scenarios
Issue: SPR-15218
2017-02-10 10:41:10 +01:00
Christoph Dreis
5cfa7e71bb Use Class.getTypeName() where appropriate
Issue: SPR-15237
2017-02-08 20:36:41 +01:00
Juergen Hoeller
acf511ac0e Polishing 2017-02-02 20:11:06 +01:00
Juergen Hoeller
c9b99daa74 SettableListenableFuture centralizes state in ListenableFutureTask subclass
Issue: SPR-15216
2017-02-02 19:54:08 +01:00
Juergen Hoeller
9666fcc41d SettableListenableFuture consistently tracks cancellation state
Issue: SPR-15202
2017-01-31 15:57:52 +01:00
Juergen Hoeller
f84907a1fc Polishing 2017-01-31 12:00:13 +01:00
Juergen Hoeller
23aac2de8c Retain single-arg assert methods in deprecated form
Issue: SPR-15196
2017-01-31 09:27:55 +01:00
Juergen Hoeller
1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Arjen Poutsma
69c16f3821 Add headers in InterceptingClientHttpRequest
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.

Issue: SPR-15166
2017-01-30 14:18:50 +01:00
Juergen Hoeller
5e946c2700 Consistent type variable resolution for arrays/collections (in particular at field level)
Dropping GenericCollectionTypeResolver in favor of direct ResolvableType usage.

Issue: SPR-15160
2017-01-24 18:00:17 +01:00
Juergen Hoeller
ed40b1c8ee Remove outdated abstractions/delegates from core/util
Issue: SPR-15159
2017-01-23 13:41:55 +01:00
Juergen Hoeller
54e2d63d6f Polishing 2017-01-19 21:21:01 +01:00
Juergen Hoeller
d21b6e596f Revised Charset handling and common StringUtils.uriDecode delegate
Issue: SPR-14492
2017-01-18 00:09:06 +01:00
Arjen Poutsma
88c5f5981f Added DataBuffer Encoder/Decoder
This commit adds a DataBuffer Encoder and Decoder, and uses it in
the annotation-based processing model.

Note that these codecs are not used in the functional processing model,
since the BodyInserter/BodyExtractor already have methods for
writing/reading DataBuffers.

Issue: SPR-15148
2017-01-17 16:46:43 +01:00
Juergen Hoeller
7c05b427a7 MimeTypeUtils constants cleanup: removed web media types
Issue: SPR-15137
2017-01-12 23:30:57 +01:00
Juergen Hoeller
743ce2cda6 Polishing 2017-01-12 23:30:38 +01:00
Juergen Hoeller
e19dff179e Polishing 2017-01-12 21:18:01 +01:00
Juergen Hoeller
50e5a65b2d LinkedCaseInsensitiveMap provides case-insensitive keySet again
Issue: SPR-15026
2017-01-12 21:14:07 +01:00
Juergen Hoeller
0403fe340d Merge pull request #1287 from markhobson/SPR-15109
Introduce mime/media types for application/rss+xml
2017-01-12 20:24:27 +01:00
Juergen Hoeller
31f7860a40 Merge pull request #1285 from dreis2211/SPR-15094
Improve performance of StringUtils.capitalize()
2017-01-12 20:22:26 +01:00
Mark Hobson
2ce2f7d9a5 Introduce mime/media types for application/rss+xml
Issue: SPR-15109
2017-01-07 17:13:32 +00:00
Sam Brannen
9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Christoph Dreis
83929b2b98 Improve performance of StringUtils.capitalize()
Issue: SPR-15094
2017-01-04 19:23:08 +01:00
Juergen Hoeller
ccabff6ba3 Upgrade to ASM 5.2
Issue: SPR-15071
2016-12-30 11:20:54 +01:00
Juergen Hoeller
e38c020535 TypeDescriptor efficiently matches equal annotations as well
Issue: SPR-15060
2016-12-28 22:51:29 +01:00
Juergen Hoeller
7818c650ba Cache ASM metadata at the context level (if supported)
Includes streamlined ClassPathBeanDefinitionScanner setup.

Issue: SPR-14654
2016-12-27 13:38:24 +01:00
Juergen Hoeller
f805427629 Detect generic type match behind interface-based proxy as well
Issue: SPR-14097
2016-12-26 11:23:07 +01:00