Commit Graph

912 Commits

Author SHA1 Message Date
stsypanov
29f382b04e Simplify String concatenation 2019-03-14 17:24:33 +01:00
Sam Brannen
9d2e7ced89 Favor Math.[min|max]() over handcrafted code
In line with the general trend toward favoring core JDK APIs for common
tasks in Spring Framework 5.2, this commit replaces handcrafted
statements with Math.min() and Math.max() were applicable.
2019-03-14 16:48:44 +01:00
Juergen Hoeller
4bee5073a0 Proper exception for non-matching argument on unique factory method
See gh-22420
2019-03-13 14:04:17 +01:00
Juergen Hoeller
c0ddaae5c0 Shared empty InjectionMetadata/LifecycleMetadata instance
Closes gh-22570
2019-03-12 22:45:24 +01:00
Sam Brannen
7dc522f0d6 Clean up warnings in Gradle build 2019-03-12 19:36:14 +01:00
Juergen Hoeller
40c62139ae Early resolution of unique factory methods in configuration classes
Includes consistent bean class resolution in the enhancement step as well as general reflection optimizations for user-declared methods.

Closes gh-22420
2019-03-12 17:17:24 +01:00
Сергей Цыпанов
a35adc6ea6 Add missing break statements to stop looping when result is known
Closes gh-22573
2019-03-12 13:15:59 +01:00
Juergen Hoeller
e3a9826e56 Bypass method traversal for annotation introspection if possible
The isCandidateClass mechanism is consistently used for a bypass check before method traversal attempts. While by default this is only bypassing standard java types, the same mechanism can be used with index metadata which indicates non-presence of certain annotations.

See gh-22420
2019-03-12 00:12:22 +01:00
Sebastien Deleuze
6266370a7a Polishing 2019-03-11 15:34:46 +01:00
Sebastien Deleuze
aabfc5f0a1 Support primitive types in BeanUtils.instantiateClass args
This commit adds support for primitive default values for
BeanUtils.instantiateClass arguments in Java in order to provide
a consistent behavior in both Java and Kotlin languages.

Closes gh-22531
2019-03-11 15:34:46 +01:00
Juergen Hoeller
a06ab6d0ad Polishing 2019-03-08 09:54:44 +01:00
Juergen Hoeller
ac4c37d8e2 Merge branch '5.1.x' 2019-03-07 18:05:46 +01:00
Juergen Hoeller
6c87ef09c1 Polishing 2019-03-07 17:55:32 +01:00
stsypanov
60b72d721d Polish: do simple clean-up 2019-03-07 16:51:44 +01:00
Juergen Hoeller
0b8733747c Upgrade to SnakeYAML 1.24 and HtmlUnit 2.34.1 2019-03-06 16:40:06 +01:00
Juergen Hoeller
5c1776ae8f Merge branch '5.1.x' 2019-03-06 16:26:00 +01:00
Juergen Hoeller
9cc862246f Local https URL resolution attempt with fallback to parser's default
See gh-22504
2019-03-06 16:23:45 +01:00
Juergen Hoeller
777b4c809d Merge branch '5.1.x' 2019-03-06 14:06:06 +01:00
Juergen Hoeller
7cbb3b06a0 Consistent local vs external resolution of https schema references
Closes gh-22504
2019-03-06 13:50:40 +01:00
Juergen Hoeller
eeed20d8d9 Polishing 2019-03-05 18:25:36 +01:00
www
ef91313342 Use String::isEmpty instead of "".equals(arg) when arg is not null 2019-03-05 14:32:56 +01:00
Juergen Hoeller
b2b0df893a Merge branch '5.1.x' 2019-03-05 14:20:02 +01:00
Juergen Hoeller
013c0bca92 Polishing 2019-03-05 13:08:11 +01:00
Sam Brannen
70cf597484 Remove obsolete overview.html files 2019-03-04 14:07:48 +01:00
Sam Brannen
d4f544d42f Add missing precondition check to AutowireUtils.resolveDependency
See gh-2060
2019-03-02 14:39:43 +01:00
Juergen Hoeller
fc7948c96b Merge branch '5.1.x' 2019-02-27 17:34:46 +01:00
Juergen Hoeller
e583da0725 Polishing 2019-02-27 17:26:53 +01:00
Juergen Hoeller
0288878bcc Consistent handling of early FactoryBean instantiation failures
Closes gh-22409
2019-02-27 17:26:35 +01:00
Sam Brannen
f2a5415111 Fix CheckStyle violations
See gh-2060
2019-02-27 16:41:00 +01:00
Sam Brannen
6f6be27aae Polish AutowireUtils[Tests]
See gh-2060
2019-02-27 16:25:34 +01:00
Loïc Ledoyen
d77b36bf3b Open parameter autowiring utility for external use (#2060)
* Make AutowireUtils public and protect its current API
* Move ParameterAutowireUtils features to AutowireUtils

Closes gh-2060
2019-02-27 15:15:45 +01:00
Sam Brannen
3a42f1154d Polishing 2019-02-27 14:03:11 +01:00
Juergen Hoeller
3a641d9297 Merge branch '5.1.x' 2019-02-26 17:50:35 +01:00
Juergen Hoeller
490b23518b Polishing 2019-02-26 17:42:49 +01:00
stsypanov
5e29ea30a3 Use StringJoiner where possible to simplify String joining 2019-02-15 14:55:35 +01:00
Juergen Hoeller
7cde283066 Merge branch '5.1.x' 2019-02-07 23:07:22 +01:00
Juergen Hoeller
15af0d9787 Polishing 2019-02-07 23:02:35 +01:00
Juergen Hoeller
0b617a8c93 Deprecate PreferencesPlaceholderConfigurer along with its base class
Also removing common PropertyPlaceholderConfigurer doc references.

See gh-22181
2019-02-07 16:53:05 +01:00
Juergen Hoeller
d25783329a Merge branch '5.1.x' 2019-02-07 16:01:14 +01:00
Juergen Hoeller
e9626779ee @Resource provides dependency descriptor for resolving beans by name
Closes gh-22359
2019-02-07 15:56:00 +01:00
Sebastien Deleuze
72ed274c6f Merge branch '5.1.x' 2019-02-06 19:35:20 +01:00
Sebastien Deleuze
d1e5a3af9f Fix truncated Value#value javadoc
Closes gh-22331
2019-02-06 19:28:31 +01:00
Sebastien Deleuze
3787b23a98 Deprecate PropertyPlaceholderConfigurer
This commit deprecates PropertyPlaceholderConfigurer in favor of
PropertySourcesPlaceholderConfigurer.

Closes gh-22181
2019-02-06 16:00:24 +01:00
Sebastien Deleuze
0b9522c84e Migrate Kotlin Mockito tests to Mockk
Closes gh-22345
2019-02-05 15:47:08 +01:00
Juergen Hoeller
ca7634dfe8 Avoid duplicate class introspection during findAnnotationOnBean
Closes gh-22318
2019-02-05 00:42:24 +01:00
Sam Brannen
0742986e0e Suppress warnings from tests in Gradle build 2019-02-01 11:13:53 +01:00
Johnny Lim
963cc09c2e Polish AutowireUtils.EXECUTABLE_COMPARATOR
Closes gh-22283
2019-01-20 17:37:46 +01:00
Juergen Hoeller
605e2477b9 Polishing 2019-01-08 21:57:13 +01:00
Juergen Hoeller
f56fa91430 Polishing 2019-01-08 17:11:34 +01:00
Juergen Hoeller
9cb5369cb9 DependencyDescriptor supports TypeDescriptor resolution for fields
This allows for proper nested type conversion in @Value Optional fields analogous to method parameters, through a new TypeDescriptor-based method in the TypeConverter SPI. As an additional and less involved measure that is worth backporting, DefaultListableBeanFactory defensively checks for pre-converted Optional wrappers.

Issue: SPR-17607
2019-01-08 17:11:27 +01:00