Commit Graph

12009 Commits

Author SHA1 Message Date
Sam Brannen 2ed3382a60 Document composed support for @Scheduled, @JmsListener, & @Sql
Issue: SPR-13973
2016-03-29 19:53:58 +02:00
Roy Clarkson f35ec5353a Add support for OkHttp3
OkHttp3 introduces a new package and API that is incompatible with
previous versions. This commit adds a new
OkHttp3ClientHttpRequestFactory and supporting classes.
2016-03-29 18:15:04 +02:00
Sam Brannen d40d2ffe5e Polishing 2016-03-29 18:04:26 +02:00
Sam Brannen 3597879608 Revert merged support for @ManagedNotification & @ManagedOperationParameter
This commit reverts the recently added merged annotation support for
Spring's JMX annotations by once again using the simpler searches for
repeatable annotations in AnnotationUtils.

Issue: SPR-13973
2016-03-29 17:51:47 +02:00
Brian Clozel eec22f5072 Avoid duplicate flush when closing outputstream
Prior to this commit, the `HttpInvokerServiceExporter` would close
its `ObjectOutputStream`, which itself issues duplicate flushes on the
underlying `OutputStream`. Duplicate flushes can lead to multiple,
separate TCP packets where those should be gathered writes.

This commit wraps the underying stream with a decorator that guards
against flush calls that are duplicated with the one done in `close`.

Issue: SPR-14040
2016-03-29 17:31:42 +02:00
Brian Clozel b947bfe8e9 Support of HTTP persistent connections for JDK client
Prior to this commit, HTTP clients relying on the JDK HTTP client would
not properly reuse existing TCP connections (i.e. HTTP 1.1 persisten
connection). The SimpleClientHttpResponse would close the actual connection once the
response is handled.

As explained in the JDK documentation
(http://docs.oracle.com/javase/8/docs/technotes/guides/net/http-keepalive.html)
HTTP clients should do the following to allow resource reuse:

* consume the whole HTTP response content
* close the response inputstream once done

This commit makes sure that the response content is
totally drained and then the stream closed (and not the connection).

Issue: SPR-14040
2016-03-29 17:31:42 +02:00
Juergen Hoeller 3910350b0a ASM ClassReader leniently handles label offset mismatch
Issue: SPR-14089
2016-03-29 15:38:23 +02:00
Juergen Hoeller 6298292523 AsyncRestTemplate triggers no-output HTTP requests immediately as well
Issue: SPR-14093
2016-03-29 15:22:32 +02:00
Juergen Hoeller 2dae4d8134 Deprecated FormTag's "commandName" in favor of "modelAttribute"
Issue: SPR-14094
2016-03-29 12:09:16 +02:00
Sam Brannen 26bbb6e767 Polishing 2016-03-28 16:17:47 +02:00
Juergen Hoeller b2a17ba537 RequestHeaderMapMethodArgumentResolver defensively checks for non-existing header values
Issue: SPR-14091
2016-03-27 14:07:25 +02:00
Sam Brannen 4fa11e334f Test @ManagedNotification as a merged, composed annotation
Issue: SPR-13973
2016-03-26 20:10:20 +01:00
Juergen Hoeller 54aeb7a5d6 Cache key classes implement Comparable and consistently provide a toString representation
Issue: SPR-14017
2016-03-26 14:32:10 +01:00
Sam Brannen a8b5ea1c51 Polishing 2016-03-26 01:27:37 +01:00
Sam Brannen 4742aa0bfe Test @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-26 01:09:35 +01:00
Sam Brannen 2353f39ee4 Clean up warnings 2016-03-26 01:08:58 +01:00
Sam Brannen 4836d06704 Test @Scheduled as a merged composable annotation
Issue: SPR-13973
2016-03-26 00:47:02 +01:00
Juergen Hoeller c6ff0951fc Polishing 2016-03-25 23:46:18 +01:00
Juergen Hoeller 94cb7786c8 Polishing 2016-03-25 23:28:45 +01:00
Brian Clozel 862d10c128 Support new default values in WebDataBinder
Prior to this commit, binding a `@ModelAttribute` object as a Controller
handler paramater would instantiate the object and set all its
properties, fetching data from the request. When no data is available,
the WebDataBinder tries to bind default "empty" values:
* Boolean.FALSE for boolean types
* empty arrays for array types
* null by default

This commit adds the new default empty values:
* empty Collections for Collection types
* empty Maps for Map types

Rather than using empty implementations provided by `Collections.empty`
(which are not mutable), we're using the closest possible target type
and real implementations, provided by the `CollectionFactory`.

Issue: SPR-13502
2016-03-25 21:37:08 +01:00
Sam Brannen b0c6357540 Test @Sql as a merged composed annotation
Issue: SPR-13973
2016-03-25 20:47:16 +01:00
Phillip Webb fc839331a7 Refine TestPropertySourceUtils for direct use
Update methods in TestPropertySourceUtils to accept var-args and allow
addInlinedProperties to be called more than once.

Issue: SPR-14088
2016-03-25 11:12:27 -07:00
Sam Brannen fee056a1b1 Simplify search algorithms in AnnotatedElementUtils
This commit introduces a boolean alwaysProcesses() method in the
Processor API which allows for simplification across all search
algorithms within AnnotatedElementUtils.

Specifically, it is no longer necessary for process() methods to verify
that the supplied annotation is actually the sought target annotation.

In addition, duplicated code has been extracted into common methods
(e.g., hasMetaAnnotationTypes()) and common Processor implementations
(e.g., AlwaysTrueBooleanAnnotationProcessor).
2016-03-25 15:59:54 +01:00
Sam Brannen c6f6e192c0 Support @Sql as a merged composed annotation
Issue: SPR-13973
2016-03-25 00:51:42 +01:00
Sam Brannen d572b022cc Support @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-25 00:51:24 +01:00
Sam Brannen c6b1f38651 Support @Scheduled as a merged composable annotation
Issue: SPR-13973
2016-03-25 00:49:59 +01:00
Sam Brannen b6d9fd39e6 Support @ManagedNotification & @ManagedOperationParameter as merged annotations
Issue: SPR-13973
2016-03-25 00:49:21 +01:00
Sam Brannen 6b7731cc89 Cross reference getMergedRepeatableAnnotations() in AnnotationUtils 2016-03-25 00:47:44 +01:00
Juergen Hoeller 775bcccd10 Polishing 2016-03-24 21:44:16 +01:00
Juergen Hoeller 852212d0c5 Polishing 2016-03-24 19:57:54 +01:00
Sam Brannen 46e0484bf8 Support searches for merged repeatable annotations with "get" semantics
This commit picks up where 2535469099 left off with added support for
"get" search semantics for merged repeatable annotations.

Specifically, this commit introduces a new
getMergedRepeatableAnnotations() method in AnnotatedElementUtils.

Issue: SPR-13973
2016-03-24 19:27:32 +01:00
Sam Brannen 8d0083ca96 Polishing 2016-03-24 19:27:32 +01:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Brian Clozel 2cdb0cf690 Temporarily comment quartz-scheduler external API 2016-03-24 17:52:54 +01:00
Juergen Hoeller 06db5aa43f Polishing 2016-03-24 15:34:17 +01:00
Juergen Hoeller 9a52c81443 UriComponentsBuilder allows more efficient (and less restrictive) CORS origin comparison
Also introduces a specifically narrowed cloneBuilder() method for UriComponentsBuilders.

Issue: SPR-14080
2016-03-24 15:33:44 +01:00
Juergen Hoeller abe7345008 DefaultCorsProcessor checks for existing CORS response before attempting to compare origin
Issue: SPR-14080
2016-03-24 15:08:19 +01:00
Juergen Hoeller 55f1c98c39 Consistent alphabetical sorting of directory content
Issue: SPR-14085
2016-03-24 15:00:17 +01:00
Sam Brannen 1ec35e9c62 Support searches for multiple merged annotations with "get" semantics
This commit picks up where a5139f3c66 left off with added support for
"get" search semantics for multiple merged annotations.

Specifically, this commit introduces a new getAllMergedAnnotations()
method in AnnotatedElementUtils.

Issue: SPR-13486
2016-03-24 14:46:56 +01:00
Juergen Hoeller 3eff478c45 RequestMethodsRequestCondition uses common HttpMethod resolution
Issue: SPR-13776
2016-03-24 13:54:00 +01:00
Juergen Hoeller 86d5c5c0f7 Avoid putIfAbsent call in HttpEntityMethodProcessor
Issue: SPR-14086
2016-03-24 13:51:48 +01:00
Juergen Hoeller 7e4563a825 Upgrade to XStream 1.4.9
Issue: SPR-14084
2016-03-24 13:51:03 +01:00
Sam Brannen 2453edbb10 Reorganize methods in AnnotatedElementUtils 2016-03-24 13:18:54 +01:00
Brian Clozel 38714b35e7 Update Javadoc external links 2016-03-24 11:40:27 +01:00
Brian Clozel 20bb25647f Polish 2016-03-24 10:56:46 +01:00
Sam Brannen 2535469099 Support repeatable annotations as composed annotations
Prior to this commit, AnnotationUtils supported searching for
repeatable annotations even if the repeatable annotation was declared
on a custom stereotype annotation. However, there was no support for
merging of attributes in composed repeatable annotations. In other
words, it was not possible for a custom annotation to override
attributes in a repeatable annotation.

This commit addresses this by introducing
findMergedRepeatableAnnotations() methods in AnnotatedElementUtils.
These new methods provide full support for explicit annotation
attribute overrides configured via @AliasFor (as well as
convention-based overrides) with "find semantics".

Issue: SPR-13973
2016-03-23 21:58:34 +01:00
Juergen Hoeller 63115ed6eb Do not use annotation detection shortcuts on Class
Issue: SPR-13440
2016-03-23 19:27:30 +01:00
Juergen Hoeller c5b318a4cc Revised 4.3 signatures for MethodParameter/DependencyDescriptor
Issue: SPR-13440
2016-03-23 18:52:27 +01:00
Juergen Hoeller 9af12d290e Polishing 2016-03-23 18:39:29 +01:00
Juergen Hoeller 5025c615b1 Consistent use of AnnotatedElementUtils.findMergedAnnotation/hasAnnotation
Issue: SPR-13440
2016-03-23 18:39:20 +01:00