Commit Graph

728 Commits

Author SHA1 Message Date
Juergen Hoeller a19d4deb24 Polishing 2018-02-28 16:41:59 +01:00
Juergen Hoeller 9962df6527 Polishing 2018-02-28 00:09:15 +01:00
igor-suhorukov d1ccecd021 Polish: to get rid unnecessary array creation 2018-02-27 23:37:54 +01:00
igor-suhorukov 7bce04c06c Polish: combine catches block with same body 2018-02-27 12:51:28 +01:00
igor-suhorukov b202205d77 Polish: String.valueOf() should not be appended to a String 2018-02-25 21:10:19 +01:00
igor-suhorukov 49fd724d8f Polish: String function use should be optimized for single characters 2018-02-25 20:48:47 +01:00
igor-suhorukov c782075a13 Polish: Array designators "[]" should be on the type, not the variable 2018-02-25 13:14:20 +01:00
Juergen Hoeller 7f58d9ede0 Efficiently merge bean name result with parent result (possibly empty) 2018-02-25 00:27:06 +01:00
igor-suhorukov 67a91cf6f9 Polish: redundant pairs of parentheses should be removed 2018-02-25 00:01:43 +01:00
Juergen Hoeller a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller d7cab23e6d Consistent use of StringUtils.toStringArray
(cherry picked from commit 6d11b40)
2018-02-16 20:49:17 +01:00
Juergen Hoeller c9d08bff41 DefaultListableBeanFactory only calls getPriority for non-null instance
Issue: SPR-16508
2018-02-16 17:27:42 +01:00
Juergen Hoeller 8d3264f680 Prefer List.sort(Comparator) over Collections.sort(List, Comparator) 2018-02-16 10:23:18 +01:00
igor-suhorukov 2be4985b8f Polish: anonymous inner classes containing only one method should become lambdas,
use getOrDefault instead of ternary operator
2018-02-16 09:38:19 +01:00
Juergen Hoeller 3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
Juergen Hoeller d5cabca2f7 Internal adaptation to Deque semantics 2018-02-12 15:55:09 +01:00
igor-suhorukov 711b0f50f2 Polish: replace the synchronized class "Stack" by an unsynchronized one such as "Deque". 2018-02-11 21:15:46 +01:00
igor-suhorukov 0ee505b73e Polish: assertion arguments should be passed in the correct order,
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
igor-suhorukov 6ea0af3540 Polish: Lambdas should be replaced with method references 2018-02-10 12:09:46 +01:00
igor-suhorukov 9a6fbf59c5 Polish: follow name convention - make immutable fields final 2018-02-10 12:09:19 +01:00
Stephane Nicoll 991eb4858e Update copyright header 2018-02-09 10:16:58 +01:00
igor-suhorukov c0b4b5787f Change this "try" to a try-with-resources
Closes gh-1671
2018-02-09 10:12:55 +01:00
Juergen Hoeller 285b01fc79 Test with all-negated profile condition
Issue: SPR-16465
2018-02-07 14:14:11 +01:00
Juergen Hoeller 5c813a366b Consistent use of @throws instead of @exception 2018-02-05 22:51:51 +01:00
Kamil Szymanski 61117245a6 Replace manual array copy with native method call
Closes gh-1606
2018-02-04 11:39:43 +01:00
Juergen Hoeller 4a1cc9ced7 Constructor-provided field values get recorded for failed binding result
Also, TypeMismatchExceptions get registered via BindingErrorProcessor.

Issue: SPR-16449
2018-02-02 11:33:56 +01:00
Juergen Hoeller 7772b914c6 Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean
Issue: SPR-16427
2018-01-29 21:13:59 +01:00
Juergen Hoeller ea5f8f5a7c Consistently handle NoClassDefFoundError in BeanUtils and related places
Issue: SPR-16369
2018-01-17 20:24:57 +01:00
Juergen Hoeller 214576673a Proper NoClassDefFoundError check against BeanUtils.instantiateClass
Issue: SPR-16369
2018-01-17 18:29:05 +01:00
sdeleuze 19a1477228 Fix Kotlin bean w/ default + secondary ctors handling
This commit polishes SPR-16022 fix in order to handle correctly
the case when primary and default constructors are the same when
a secondary constructor is defined.

Issue: SPR-16289
2018-01-10 18:29:33 +01:00
Juergen Hoeller 45828cb934 Check BeanInfoFactory for interface introspection as well
Issue: SPR-16322
2018-01-08 18:05:02 +01:00
Juergen Hoeller 4adc820714 Warning instead of error for non-present type filter class
Issue: SPR-16356
2018-01-08 13:41:23 +01:00
Juergen Hoeller 4a57e26d76 Polishing 2018-01-07 23:33:35 +01:00
Juergen Hoeller 18d90ec140 Properly handle null FactoryBean instance
Issue: SPR-16250
2018-01-07 23:22:56 +01:00
Juergen Hoeller d3e0f4dd91 Consider enum subclasses as simple value types as well
Issue: SPR-16278
2018-01-07 23:20:09 +01:00
Juergen Hoeller 9beb97880f Support for static field access on non-public enums
Issue: SPR-16284
2018-01-07 23:19:47 +01:00
Christoph Dreis 260ebeca3a Improve performance of some string operations
Issue: SPR-16293
2017-12-12 17:14:24 +01:00
sdeleuze 9f1d8517ba Polish Kotlin source code style 2017-11-21 15:59:23 +01:00
Juergen Hoeller 84699c8b9b Document common use cases for @Order vs @Priority vs @DependsOn
Issue: SPR-16213
2017-11-20 12:53:37 +01:00
Juergen Hoeller 7697b398d5 Polishing 2017-11-14 17:11:16 +01:00
sdeleuze edf8232555 Avoid implicit autowiring with Kotlin secondary ctors
Autowiring implicitely Kotlin primary constructors
when there are secondary constructors has side effects
on ConstructorResolver. It seems reasonable to
require explicit @Autowired annotation in such case.

With this commit, implicit autowiring of Kotlin
primary constructors is only performed when there
is a primary constructor defined alone or with
a default constructor (define explicitly or
generated via the kotlin-noarg compiler plugin
or via optional constructor parameters with default
values).

Issue: SPR-16022
2017-11-14 09:25:46 +01:00
Juergen Hoeller b5cedd43eb Consistent and efficient access to BeanDefinition argument values
Issue: SPR-16192
2017-11-13 21:51:11 +01:00
Juergen Hoeller a5da05c3dc Comprehensive documentation on injection point matching
Issue: SPR-16142
2017-11-10 20:20:13 +01:00
sdeleuze 1a246c0a67 Fix ListableBeanFactory Kotlin extensions return types 2017-11-07 13:51:53 +01:00
Juergen Hoeller 9649b0cb25 Properly resolve null beans as getBeansOfType result entries
Issue: SPR-16163
2017-11-06 13:27:51 +01:00
Juergen Hoeller 5f270bc432 Upgrade to SnakeYAML 1.19 2017-10-18 12:17:13 +02:00
Juergen Hoeller 91a8993895 Skip init/destroy method check for null beans
Issue: SPR-16063
2017-10-12 15:31:57 +02:00
Juergen Hoeller c9d3c2690d Properly resolve null candidates for collection injection
Issue: SPR-16033
2017-10-02 12:27:11 +02:00
Juergen Hoeller ec345bf162 Revised handling of missing data class arguments
Includes unified detection of Kotlin's optional parameters in MethodParameter.isOptional(), reduces BeanUtils.findPrimaryConstructor to Kotlin semantics (for reuse in AutowiredAnnotationBeanPostProcessor), and finally introduces a common KotlinDetector delegate with an isKotlinType(Class) check.

Issue: SPR-15877
Issue: SPR-16020
2017-09-28 00:31:12 +02:00
Sebastien Deleuze fb09a75c82 Improve support of Kotlin beans w/ primary and default ctors
This commit add the default constructor if available as
fallback after to the primary constructor.

Issue: SPR-16012
2017-09-27 11:27:00 +02:00