Commit Graph

1365 Commits

Author SHA1 Message Date
Sam Brannen
773cd3241b Polishing 2017-11-28 14:11:21 +01:00
sdeleuze
9f1d8517ba Polish Kotlin source code style 2017-11-21 15:59:23 +01:00
Juergen Hoeller
5843173567 Polishing 2017-11-21 13:42:57 +01:00
Juergen Hoeller
08c95fbcb3 Unit tests for configuration superclass inclusion
Issue: SPR-16217
2017-11-21 13:42:01 +01:00
Juergen Hoeller
40dacd3c1c Polishing 2017-11-20 22:27:07 +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
85baba33bf Accessors for PeriodicTrigger properties
Issue: SPR-15982
2017-11-14 17:09:19 +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
e2bb06edbd Unit tests for unresolvable generics with partial mismatch
Issue: SPR-16179
2017-11-13 21:51:02 +01:00
Juergen Hoeller
3091feee23 SpringValidatorAdapter skips value retrieval for Set field without index
Issue: SPR-16177
2017-11-13 21:50:55 +01:00
Juergen Hoeller
ffd6eff369 Scheduled task introspection through ScheduledTaskHolder interface
Issue: SPR-15982
2017-11-06 18:36:39 +01:00
Juergen Hoeller
9511d29adb Updated bean count expectations in ClassPathBeanDefinitionScannerTests
Issue: SPR-16152
2017-11-06 18:36:29 +01:00
Stephane Nicoll
1838ddb95d Support Ant-style package name with component index
This commit improves the component index so that it supports ant-style
package name (i.e. com.example.**.foo).

Issue: SPR-16152
2017-11-06 15:19:30 +01:00
Juergen Hoeller
1611ce7180 AbstractApplicationContext silently ignores non-initialized ApplicationEventMulticaster/LifecycleProcessor on destruction
Issue: SPR-16149
2017-11-02 16:07:12 +01:00
Juergen Hoeller
e5c8dc0d65 MessageSource.getMessage returns null default message as-is (again)
Issue: SPR-16127
2017-10-31 11:06:42 +01:00
Haruki Okada
159da04eed Fix wrong javadoc example
Closes gh-1575
2017-10-23 09:20:19 +02:00
Juergen Hoeller
c7100f771c Explicit notes on advice mode proxy vs aspectj
Issue: SPR-16092
2017-10-22 20:34:34 +02:00
Juergen Hoeller
d1fac36e3e SchedulingConfigurer and JmsListenerConfigurer respect @Order
Issue: SPR-16090
2017-10-20 16:10:12 +02:00
Juergen Hoeller
c3378fda33 AbstractMessageSource properly interacts with non-AbstractMessageSource parent
Issue: SPR-16047
2017-10-18 20:21:12 +02:00
Juergen Hoeller
d1b5b5d2f7 Clarify destroy method suppression for DisposableBean vs (Auto)Closeable
Issue: SPR-16078

(cherry picked from commit dff2c84)
2017-10-16 23:53:02 +02:00
Juergen Hoeller
43b5e21947 Consistent alias declarations for value attribute on stereotypes
Issue: SPR-16066
2017-10-13 18:18:12 +02:00
Juergen Hoeller
625737f90a Controller/Repository/Service declare value attribute as alias for Component
Issue: SPR-16066
2017-10-13 14:24:12 +02:00
Juergen Hoeller
ad4c8e7c0d Consistently sort BeanDefinitionRegistryPostProcessors
Issue: SPR-16043
2017-10-09 13:59:09 +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
Juergen Hoeller
efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Sebastien Deleuze
23497a7ece Support autowiring by constructor in Kotlin bean DSL
Issue: SPR-16014
2017-09-27 01:25:22 +02:00
Sebastien Deleuze
14cba15296 Open router and bean Kotlin DSL to allow building custom ones 2017-09-26 16:31:16 +02:00
Juergen Hoeller
7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Xavier Downs
dba1ef0b26 Fix Javadoc typo
Closes gh-1531
2017-09-20 09:30:37 +02:00
Sebastien Deleuze
1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller
4371350b5d Polishing 2017-09-10 21:56:31 +02:00
Juergen Hoeller
30d67f7c42 Tests for @Lazy Validator setup
Issue: SPR-15807
2017-09-10 21:56:23 +02:00
Sebastien Deleuze
8b8a6766de Change BeanDefinitionDsl to implement ApplicationContextInitializer 2017-09-04 10:46:20 +02:00
Juergen Hoeller
26284cac4f Hibernate Validator 5 compatible support for element constraints
Issue: SPR-15916
Issue: SPR-15839
2017-09-01 16:40:24 +02:00
Juergen Hoeller
97ded1dcc7 Polishing 2017-09-01 14:05:35 +02:00
Juergen Hoeller
30bd5827b0 ConfigurationClassEnhancer leniently allows for null bean references
Issue: SPR-15829
2017-09-01 14:05:14 +02:00
Sebastien Deleuze
d2c1b284f3 Polish Kotlin API contracts and documentation
Issue: SPR-15659
2017-08-29 00:56:39 +02:00
Stephane Nicoll
f6e7fef236 Polish 2017-08-19 10:50:41 +02:00
Juergen Hoeller
b94302b5bd Enforce non-null value from getBean and at injection points
Bean-derived null values may still get passed into bean properties and injection points but only if those are declared as non-required. Note that getBean will never return null; a manual bean.equals(null) / "null".equals(bean.toString()) check identifies expected null values now.  This will only ever happen with custom FactoryBeans or factory methods returning null - and since all common cases are handled by autowiring or bean property values in bean definitions, there should be no need to ever manually check for such a null value received from getBean.

Issue: SPR-15829
2017-08-18 00:11:35 +02:00
Sebastien Deleuze
73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller
ec1eafc46f @Lazy falls back to empty map/list/set for non-required collection dependency
Issue: SPR-15858
2017-08-17 12:28:55 +02:00
Juergen Hoeller
adeb521ce4 Polishing 2017-08-08 17:27:28 +02:00
Juergen Hoeller
de09f8ca1f Support for Bean Validation 2.0 container elements (with BV 2.0 test setup)
Includes latest dependency updates (Hibernate Validator 6.0.1, Caffeine 2.5.4, Netty 4.1.14, Tomcat 8.5.19, Johnzon 1.1.2, JsonPath 2.4, Jython 2.7.1)

Issue: SPR-15839
Issue: SPR-15808
2017-08-08 17:26:30 +02:00
Juergen Hoeller
ca0983cd85 Polishing 2017-08-01 12:08:57 +02:00
Juergen Hoeller
dd2bbcb3ec Leniently handle lambda-defined listeners with ErrorHandler as well
Issue: SPR-15838
2017-08-01 12:06:41 +02:00
Juergen Hoeller
1fbd047003 checkConfigurationClassCandidate explicitly skips factory method definitions
Issue: SPR-14603
2017-08-01 12:05:26 +02:00
Sebastien Deleuze
29c112c010 Avoid requiring it parameter in Kotlin bean DSL
By using function literals with receiver, we can avoid requiring
lambda parameters for a shorter and nicer syntax. Based on a
proposal from Joseph Taylor.

Issue: SPR-15815
2017-07-25 11:21:08 +02:00
Juergen Hoeller
ac1d3b22c9 Polishing 2017-07-19 22:22:27 +02:00
Juergen Hoeller
46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller
9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00