Commit Graph

1172 Commits

Author SHA1 Message Date
Juergen Hoeller
e5fdd4cd1d Extracted AbstractJsonHttpMessageConverter from GsonHttpMessageConverter
Generic type resolution algorithm in GenericTypeResolver shared between Jackson and Gson.

Issue: SPR-15381
2017-04-10 15:36:29 +02:00
Juergen Hoeller
ea5cb26d75 LogFactory obtains ClassLoader-specific LoggerContext for Log4J
Issue: SPR-14512
2017-04-07 16:34:12 +02:00
Juergen Hoeller
8cb24e0d93 SettableTask.checkCompletingThread() only resets marker after match
Issue: SPR-15409
2017-04-07 13:39:58 +02:00
Juergen Hoeller
2566d6f5c8 LogFactory differentiates between SLF4J API and SPI presence
Issue: SPR-14512
2017-04-06 17:10:37 +02:00
Juergen Hoeller
702e01ad52 UrlResource applies StringUtils.getFilename against cleaned URL path
Issue: SPR-15411
2017-04-06 14:27:00 +02:00
Juergen Hoeller
67ea4b3a05 package-info for repackaged libraries (and other polishing) 2017-04-06 14:10:46 +02:00
Juergen Hoeller
75dd8d9c06 UrlResource applies StringUtils.getFilename against URL path
Issue: SPR-15411
2017-04-06 14:07:22 +02:00
Juergen Hoeller
3037277d0e Minimize reflective interaction with annotation instances during retrieval
Issue: SPR-15387
2017-04-06 14:07:17 +02:00
Juergen Hoeller
45e7b350bd LogFactory provides getFactory() with getInstance methods as well
Issue: SPR-14512
2017-04-05 22:24:09 +02:00
Juergen Hoeller
47277f43da spring-core provides custom variant of Commons Logging
Includes dependency updates (JavaMail 1.6 RC1, RxJava 2.0.8, Tomcat 8.5.13, Undertow 1.4.12, XNIO 3.4.5)

Issue: SPR-14512
2017-04-05 21:22:44 +02:00
Rossen Stoyanchev
ae2306326e Add RxJava1 Reactive Streams adapters check 2017-04-04 12:25:58 -04:00
Juergen Hoeller
e9627a10c7 Deprecate ObjectUtils.hashCode for primitives in favor of JDK 8's hashCode methods
Issue: SPR-15395
2017-04-04 17:16:50 +02:00
Rossen Stoyanchev
37f9c86758 Fix failing tests due to last commit 2017-04-03 09:38:08 -04:00
Rossen Stoyanchev
62c1e44db2 Spring MVC supports reactive return values
This commit adds support for reactive library types to be returned
directly from controller methods adapting them either to a
ResponseBodyEmitter (streaming) or DeferredResult (non-streaming).

The reactive libraries supported are the ones that can adapted to a
Reactive Streams Publisher through the ReactiveAdapterRegistry.

Issue: SPR-15365
2017-04-03 09:01:49 -04:00
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
stonio
412947a53f Polish CollectionFactoryTests
Closes gh-1334
2017-03-27 12:51:11 +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
Juergen Hoeller
f4de1ea147 Polishing 2017-02-22 15:32:19 +01:00
Juergen Hoeller
6108ab1c31 Test for expected behavior of getAllMergedAnnotations vs findAllMergedAnnotations
Issue: SPR-15271
2017-02-22 15:28:34 +01:00
stonio
7d062df992 Use String#isEmpty()
Closes gh-1335
2017-02-22 11:55:17 +01:00
Stephane Nicoll
598d9a4b05 Add test to reproduce SPR-15271 2017-02-20 11:34:08 +01:00
Juergen Hoeller
45df1d9fea Javadoc fixes 2017-02-18 01:43:30 +01:00
Juergen Hoeller
9543384d9e Avoid deprecated comparators in tests
Issue: SPR-14779
2017-02-16 15:36:27 +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