Commit Graph

20111 Commits

Author SHA1 Message Date
lixiaolong11000
bee2b7cd73 Add missing test cases in XmlBeanFactoryTests
Closes gh-24189
2019-12-13 15:56:06 +01:00
Sam Brannen
49ddf798e0 Polish ClassUtils.resolvePrimitiveClassName()
See gh-24192
2019-12-13 15:47:05 +01:00
Arjen Poutsma
09b6730f3d Expose logPrefix in ClientResponse
This commit exposes the logPrefix field in the ClientResponse interface.

Closes gh-24146
2019-12-13 10:59:53 +01:00
Gary Russell
63844c6d74 MappingJackson2MessageConverter: fix javadoc typo
`getJavaTypeForMessage()` - wrong parameter description.
2019-12-13 09:58:46 +01:00
Rossen Stoyanchev
1dd0a0f009 Fix since tags from prior commit 2019-12-12 22:03:38 +00:00
Rossen Stoyanchev
b23617637d Fix cloning issue in CodecConfigurer for multipart writers
Closes gh-24194
2019-12-12 21:58:14 +00:00
Rossen Stoyanchev
dd9b6287b4 Expose ClientCodecConfigurer in WebClient.Builder
Using Consumer<ClientCodecConfigurer> instead of
Consumer<ExchangeStrategies> eliminates one level of nesting that is
also unnecessary since codecs are the only strategy at present.

Closes gh-24124
2019-12-12 21:58:14 +00:00
Rossen Stoyanchev
11e321b8e7 Add register methods to CodecConfigurer.CustomCodecs
The new register methods replace the now deprecated
encoder, decoder, reader, and writer methods, and also offer a choice
to opt into default properties such maxInMemorySize, if configured.

See gh-24124
2019-12-12 21:58:14 +00:00
Rossen Stoyanchev
9d65830133 CodecConfigurer implementation refactoring
See gh-24124
2019-12-12 21:57:45 +00:00
Juergen Hoeller
fa8f08391f Consistent use of annotation-api dependency instead of tomcat-embed-core 2019-12-12 17:21:41 +01:00
Juergen Hoeller
b679c3b6ec Upgrade to Tomcat 9.0.30 2019-12-12 16:44:21 +01:00
Juergen Hoeller
02b40223e5 Polishing 2019-12-12 16:43:00 +01:00
perceptron8
dafe57fc6e Add BeanPropertyRowMapper.newInstance(mappedClass, conversionService)
Similar to SingleColumnRowMapper.newInstance(requiredType,
conversionService) which was added in #1678.
2019-12-12 15:40:55 +01:00
Sam Brannen
d757f73902 Handle exceptions in annotation searches again
Prior to Spring Framework 5.2, most annotation search algorithms made
use of AnnotationUtils.handleIntrospectionFailure() to handle exceptions
thrown while attempting to introspect annotation metadata. With the
introduction of the new MergedAnnotation API in Spring Framework 5.2,
this exception handling was accidentally removed.

This commit introduces the use of handleIntrospectionFailure() within
the new MergedAnnotation internals in order to (hopefully) align with
the previous behavior.

Closes gh-24188
2019-12-12 11:29:06 +01:00
Juergen Hoeller
9af8dc0980 Polishing 2019-12-11 17:04:49 +01:00
Johnny Lim
8ac222467b Short-circuit boolean logic in AbstractBeanDefinition.equals()
Closes gh-24185
2019-12-11 16:46:47 +01:00
Sam Brannen
6e21b19999 Make TYPE_HIERARCHY_AND_ENCLOSING_CLASSES annotation search strategy defensive
Prior to this commit, when searching for annotations using the
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES strategy an exception could be
thrown while attempting to load the enclosing class (e.g., a
NoClassDefFoundError), thereby halting the entire annotation scanning
process.

This commit makes this search strategy defensive by logging exceptions
encountered while processing the enclosing class hierarchy instead of
allowing the exception to halt the entire annotation scanning process.

The exception handling is performed by
AnnotationUtils.handleIntrospectionFailure() which only allows an
AnnotationConfigurationException to propagate.

See gh-24136
2019-12-10 22:38:55 +01:00
Sam Brannen
16ed7e2a19 Only load enclosing class for TYPE_HIERARCHY_AND_ENCLOSING_CLASSES strategy
Prior to this commit, the enclosing class was always eagerly loaded
even if the annotation search strategy was not explicitly
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES.

See gh-24136
2019-12-10 22:08:26 +01:00
Sam Brannen
76bc581528 Polishing 2019-12-10 22:06:22 +01:00
Rossen Stoyanchev
9b30d46ff4 JSON charset handling in StringHttpMessageConverter
This commit restores the interpretation of JSON as UTF-8 by default that
was removed in #bc205e0 and also ensures a charset is not appended
automatically to "application/json".

Closes gh-24123
2019-12-10 16:52:23 +00:00
Rossen Stoyanchev
70a0c93d69 Correct WebFlux docs on BindingResult with @RequestBody
Closes gh-22997
2019-12-10 16:01:33 +00:00
Rossen Stoyanchev
c8bce9686f ContentDisposition trims charset in filename
Closes gh-24112
2019-12-10 15:38:28 +00:00
Rossen Stoyanchev
f180bf7652 Add "application/*+xml" to XML decoders
Closes gh-24164
2019-12-10 15:18:04 +00:00
Rossen Stoyanchev
1b172c1d20 Expose localAddress in WebFlux server
Closes gh-24174
2019-12-10 15:10:13 +00:00
Sam Brannen
2bd821c909 Improve exception for mixed explicit/implicit aliases with @AliasFor
Given the following improperly configured composed @RequestMapping
annotation:

@Retention(RetentionPolicy.RUNTIME)
@RequestMapping
@interface PostApi {

	@AliasFor("value")
	String[] path() default {};

	@AliasFor(annotation = RequestMapping.class, attribute = "path")
	String[] value() default {};
}

Prior to this commit, an attempt to process the above annotation
resulted in an exception similar to the following, which is not
especially helpful to discern the problem.

> Attribute 'value' in annotation [PostApi] must be declared as an
> @AliasFor 'path', not 'path'.

This commit improves the exception message for such scenarios,
resulting in an exception message similar to the following.

> Attribute 'value' in annotation [PostApi] must be declared as an
> @AliasFor attribute 'path' in annotation [PostApi], not attribute
> 'path' in annotation [RequestMapping].

Closes gh-24168
2019-12-10 14:36:11 +01:00
Sam Brannen
4466114cfa Polishing 2019-12-10 14:26:48 +01:00
Stephane Nicoll
8d846500ef Merge pull request #24172 from izeye
* pr/24172:
  Use hasSize() where possible

Closes gh-24172
2019-12-10 07:59:17 +01:00
Johnny Lim
1e83e889aa Use hasSize() where possible
See gh-24172
2019-12-10 07:58:53 +01:00
Juergen Hoeller
0a2046e81c Upgrade to Hibernate ORM 5.4.10, Protobuf 3.11.1, Joda-Time 2.10.5, Commons Pool 2.7 2019-12-10 00:24:26 +01:00
Juergen Hoeller
2c03246f00 Polishing 2019-12-09 15:58:21 +01:00
Juergen Hoeller
2d2993dffb Cleanup of "varaible" typos in ResolvableTypeTests 2019-12-09 14:03:56 +01:00
Juergen Hoeller
a4f75e9c6a Polishing 2019-12-09 13:29:00 +01:00
Juergen Hoeller
119dd04ae5 Avoid ByteArrayOutputStream for source values without the need to be encoded
Closes gh-24152
2019-12-09 13:28:39 +01:00
stsypanov
ebbb562cb9 Hoist constant result of SerializableTypeWrapper.unwrap() out of loop 2019-12-09 13:14:10 +01:00
Sébastien Deleuze
0f41536820 Fix RSocketRequester Coroutines extensions
After gh-24073, some Coroutines extensions should be applied on
RetrieveSpec instead of RequestSpec.

Closes gh-24166
2019-12-09 11:50:06 +01:00
Stephane Nicoll
b1e59961fb Merge pull request #24160 from PyvesB
* pr/24160:
  Polish DataBufferUtils javadoc

Closes gh-24160
2019-12-08 14:02:32 +01:00
PyvesB
e15ccdb35d Polish DataBufferUtils javadoc
See gh-24160
2019-12-08 14:01:55 +01:00
Sam Brannen
2108bdf876 Introduce regression test for prototype @ControllerAdvice beans
See gh-24157
2019-12-07 18:30:56 +01:00
Sam Brannen
fc42ca2866 Polish contribution
See gh-24157
2019-12-07 13:41:43 +01:00
yokotaso
d7d474f658 Do not cache prototype @ControllerAdvice beans
Spring Framework 5.2 introduced support for caching @ControllerAdvice
beans; however, this caching was also applied incorrectly to
non-singleton beans.

This commit addresses this regression by only caching singleton
@ControllerAdvice beans.

Closes gh-24157
2019-12-07 13:39:30 +01:00
Sam Brannen
55ae3c5e87 Polishing 2019-12-07 12:59:03 +01:00
Sam Brannen
de8a6c8c57 Polishing 2019-12-06 19:08:54 +01:00
Eric Helgeson
d4d940e6e3 Add missing backtick in WebSocket documentation
Closes gh-24155
2019-12-06 19:02:22 +01:00
stsypanov
484006ce90 Hoist Class.getName() from String concatenation to dodge an issue related to profile pollution 2019-12-06 17:36:07 +01:00
Phillip Webb
7c84695333 Support variable resolution of wildcard types
Update `ResolvableType` so that variable referenced can be resolved
against wildcard types. Prior to this commit, given a type:

	Map<String, ? extends List<? extends CharSequence>>

Calling `type.getGeneric(1).asCollection().resolveGeneric()` would
return `null`. This was because the `List` variable `E` referenced a
wildcard type which `resolveVariable` did not support.

Closes gh-24145
2019-12-06 13:38:46 +01:00
Sam Brannen
a4fa6a7a31 Test status quo for @Inherited annotation support in AnnotationMetadata 2019-12-05 23:30:14 +01:00
Sam Brannen
3b9d1a00b0 Polishing 2019-12-05 22:37:00 +01:00
Juergen Hoeller
c2141e2e93 Add @since tags to firstElement methods 2019-12-05 16:36:55 +01:00
Vitalii Rastvorov
d503bc2804 Add firstElement to CollectionUtils 2019-12-05 16:26:25 +01:00
Johnny Lim
14ce84cebb Fix status code in webflux.adoc 2019-12-05 12:25:04 +00:00