Juergen Hoeller
b8b6367f9b
ConcurrentModel ignores null value for put (also used by putAll)
...
Issue: SPR-17141
2018-08-08 23:51:55 +02:00
Sam Brannen
52f6dcf525
Fix typo
2018-08-08 13:25:14 +02:00
Kazuhiro Sera
be211ceead
Fix typos detected by github.com/client9/misspell
2018-08-08 12:50:46 +02:00
Juergen Hoeller
b325c74216
Pruning of outdated JDK 6/7 references (plus related polishing)
2018-08-07 20:36:47 +02:00
Juergen Hoeller
2b051b8b32
Deprecate support classes for Sun's JDK HTTP server
...
Issue: SPR-17143
2018-08-07 20:35:53 +02:00
Juergen Hoeller
34ddb88851
ConcurrentModel.addAttribute(String, Object) ignores null value
...
Issue: SPR-17141
2018-08-07 20:35:34 +02:00
Juergen Hoeller
2938a95435
Pre-size LinkedHashSet for annotation parsers
...
Issue: SPR-17074
2018-08-07 01:35:57 +02:00
Juergen Hoeller
d72d376f03
Avoid unnecessary annotation introspection on framework methods
...
Issue: SPR-16933
2018-08-07 01:35:32 +02:00
Juergen Hoeller
e64c6dfa3d
MergedBeanDefinitionPostProcessors clear internal caches on bean reset
...
Issue: SPR-17126
2018-08-06 15:41:35 +02:00
Juergen Hoeller
50550717d6
SchedulingTaskExecutor provides prefersShortLivedTasks default method
...
Issue: SPR-17116
2018-08-02 14:36:53 +02:00
Juergen Hoeller
589b7048ec
Avoid synthesizable annotation creation for @Bean/@Scope processing
...
Includes consistent (non-)use of AnnotationUtils/AnnotatedElementUtils.
Issue: SPR-16933
2018-08-01 11:43:28 +02:00
Сергей Цыпанов
f8340838b3
Use lambda expressions for lazy instantiation ( #1911 )
...
Issue: SPR-17074
2018-07-31 13:03:18 +02:00
Juergen Hoeller
f74a631ea1
Nullability refinements in spring-webmvc
...
Includes revision of web.servlet.tags.form for non-null conventions.
Issue: SPR-15540
2018-07-30 22:08:11 +02:00
Juergen Hoeller
4a147d26fc
Initialize pre-filled HashMaps with large enough capacity
...
Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed).
Issue: SPR-17105
2018-07-30 22:07:31 +02:00
Juergen Hoeller
1fd6248d84
Polishing
2018-07-27 17:46:21 +02:00
Juergen Hoeller
c037e75f26
Improve debug logging at BeanDefinitionReader and BeanFactory level
...
Issue: SPR-17090
2018-07-27 17:46:05 +02:00
Juergen Hoeller
025fd2962e
Polishing
2018-07-26 23:51:52 +02:00
Juergen Hoeller
7c9ba80f85
Polishing
2018-07-26 23:20:50 +02:00
Bhavani Shekhawat
ee95f171c8
Update PropertySourcesPlaceholderConfigurer.java
...
Fix the error message when PropertySources are not applied
2018-07-26 20:48:50 +02:00
Juergen Hoeller
e458777925
Properly identify event-related ClassCastExceptions on JDK 11
...
Issue: SPR-17093
2018-07-26 14:41:53 +02:00
Rossen Stoyanchev
14d0fee86c
Improve context-related logging on web startup
...
Sample output at TRACE:
```
DispatcherServlet - Initializing Servlet 'org.springframework.web.servlet.DispatcherServlet-7a8c8dcf'
AnnotationConfigWebApplicationContext - Refreshing WebApplicationContext for namespace 'org.springframework.web.servlet.DispatcherServlet-7a8c8dcf-servlet', started on Wed Jul 25 17:46:38 EDT 2018
AnnotationConfigWebApplicationContext - Registering [org.springframework.web.servlet.mvc.method.annotation.RequestPartIntegrationTests$CommonsMultipartResolverTestConfig]
AnnotationConfigWebApplicationContext - No 'messageSource' bean, using [Empty MessageSource]
AnnotationConfigWebApplicationContext - No 'applicationEventMulticaster' bean, using [SimpleApplicationEventMulticaster]
AnnotationConfigWebApplicationContext - No 'lifecycleProcessor' bean, using [DefaultLifecycleProcessor]
...
DispatcherServlet - Initialization completed in 3361 ms
```
Issue: SPR-16946
2018-07-25 17:50:03 -04:00
Sebastien Deleuze
d3b244a81b
Optimize class detection by sharing the ClassLoader
...
Issue: SPR-17083
2018-07-25 11:09:42 +02:00
Juergen Hoeller
47d8fe83df
Upgrade to Interceptor API 1.2.2, Moneta 1.3, Rome 1.11
2018-07-24 14:44:56 +02:00
Juergen Hoeller
20c34cbb9b
Provide predetermined capacity for cache operation collections
...
Issue: SPR-17079
2018-07-24 13:27:02 +02:00
Juergen Hoeller
a9c9ba6601
Generic matching for ObjectProvider stream and empty vararg resolution
...
Issue: SPR-11419
Issue: SPR-15338
2018-07-24 13:03:54 +02:00
Juergen Hoeller
1603c4ab2f
Programmatic ObjectProvider retrieval through BeanFactory API
...
Introduces getBeanProvider(Class) and getBeanProvider(ResolvableType), also narrowing getBean(String, Class) and isTypeMatch(String, Class) to a non-null Class argument and enriching NoUniqueBeanDefinitionException with a full ResolvableType. In addition, ObjectProvider supports iterable/stream access for collection-style resolution of multiple matching beans now, and collection injection falls back to an empty collection in a single-constructor case with non-null arguments.
Issue: SPR-17075
Issue: SPR-11419
Issue: SPR-15338
2018-07-24 00:42:03 +02:00
Juergen Hoeller
13873dafb7
Polishing
2018-07-22 17:55:31 +02:00
Juergen Hoeller
9a43d2ec20
Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
...
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Juergen Hoeller
252f52ab07
Tighten (IntroductionAware)MethodMatcher contract
...
Provides a non-null guarantee for MethodMatcher's targetClass argument and strict separation between IntroductionAwareMethodMatcher and regular MethodMatcher, enabling DefaultAdvisorChainFactory to defer its IntroductionAdvisor determination until encountering an actual IntroductionAwareMethodMatcher (even behind union/intersection).
Issue: SPR-17068
2018-07-20 00:17:31 +02:00
Juergen Hoeller
478d7255d2
GenericApplicationListenerAdapter caches resolved event types
...
Issue: SPR-16970
2018-07-19 16:34:19 +02:00
Juergen Hoeller
52d124de6f
Use supplier-aligned type information for FactoryBean type resolution
...
Issue: SPR-17063
2018-07-19 13:14:20 +02:00
Juergen Hoeller
0b60447c49
Javadoc update: ConfigurationClassPostProcessor is priority-ordered
...
Issue: SPR-17062
2018-07-19 11:59:40 +02:00
Juergen Hoeller
9c08a482d1
Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
...
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity).
Issue: SPR-17037
2018-07-18 22:17:42 +02:00
Juergen Hoeller
28f7b26294
Null-returning instance supplier resolves to NullBean
...
Issue: SPR-17057
2018-07-18 15:26:06 +02:00
Juergen Hoeller
5fcfe0fa8e
Polishing
2018-07-18 14:27:16 +02:00
Juergen Hoeller
955665b419
Consistent processing of binding/validation failures for data classes
...
Includes an extension of SmartValidator for candidate value validation, as well as nullability refinements in Validator and BindingResult.
Issue: SPR-16840
Issue: SPR-16841
Issue: SPR-16854
2018-07-17 17:01:34 +02:00
Juergen Hoeller
faef363e85
Evaluate @Cacheable(condition) once per method invocation only
...
Issue: SPR-17024
2018-07-16 13:04:14 +02:00
Juergen Hoeller
f6fdffd663
Lazily retrieve delegate beans in AsyncConfigurer and CachingConfigurer
...
Introduces a configure method pattern for Supplier-style configuration and a common SingletonSupplier decorator for method reference suppliers. Also declares jcache.config and jcache.interceptor for non-null conventions.
Issue: SPR-17021
2018-07-14 19:29:32 +02:00
Juergen Hoeller
f123d6c3bc
Upgrade to Netty 4.1.27 and Commons Pool 2.6
2018-07-12 16:53:37 +02:00
Juergen Hoeller
fc699b2b37
@Bean provides autowireCandidate flag (analogous to XML definitions)
...
Issue: SPR-16204
2018-07-04 22:41:05 +02:00
Juergen Hoeller
a5dd0f0c09
Fix accidental @Nullable declaration on addAttribute(Object)
...
Issue: SPR-16831
2018-07-04 15:06:56 +02:00
Juergen Hoeller
f2787cfb35
Same method filtering in ConstructorResolver and getTypeForFactoryMethod
...
Issue: SPR-16999
2018-07-03 15:53:17 +02:00
Juergen Hoeller
e5a6711d29
Consistent final declaration for static delegate classes
...
Issue: SPR-16968
2018-07-02 13:55:18 +02:00
Juergen Hoeller
4ff1e3e74b
Consistent abstract declaration for utility classes (plus polishing)
...
Issue: SPR-16968
2018-07-01 02:31:20 +02:00
Juergen Hoeller
d58c09b89f
Up-to-date coverage of task executor and scheduler variants
...
Includes a clarification of ThreadPoolExecutor configuration options and a note on early AsyncConfigurer initialization.
Issue: SPR-16944
Issue: SPR-16945
2018-06-29 19:43:14 +02:00
Juergen Hoeller
8ad5299f4a
Polishing
2018-06-28 17:12:29 +02:00
Juergen Hoeller
40efcc933c
Polishing
2018-06-28 14:51:33 +02:00
Juergen Hoeller
81cb740e0a
New postProcessProperties variant on InstantiationAwareBeanPostProcessor
...
Allows for skipping the now-deprecated postProcessPropertyValues callback with its expensive PropertyDescriptor retrieval requirement. RequiredAnnotationBeanPostProcessor (which is dependent on postProcessPropertyValues) and the @Required annotation itself are also deprecated now: in favor of constructor injection (or afterPropertiesSet).
Issue: SPR-16918
2018-06-28 14:15:16 +02:00
Phillip Webb
a89e716cc7
Use tabs rather than spaces in tests
...
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
1c25cec44f
Polish test code
...
Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
81451aa800
Organize imports
...
Reorganize imports to ensure consistent ordering. This commit also
expands any `.*` static imports in favor of using fully-qualified
method references.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
b220d94cc2
Never use parenthesis for single lambda arguments
...
Update all lambdas that take a single argument so that parenthesis
are never used.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
5cedd0d5d4
Consistently use tabs rather than spaces
...
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
9de3689f63
Never use 'this.' when accessing loggers
...
Ensure that `this.` is never used when accessing loggers.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
0b53c1096a
Always use 'this.' when accessing fields
...
Ensure that `this.` is used consistently when accessing class
fields.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
eeebd51f57
Use consistent class design
...
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
0ad0f341bd
Don't use single letter catch variables
...
Update existing catch blocks to ensure that `ex` is always used
in preference to `e` or `t` as the variable name.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
866e9d702e
Use consistent block style
...
Update all code to use a consistent block style.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
c3a17dfd47
Ensure all files end with a newline
...
Update all files to ensure that they always end with a new line.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e0480f75ac
Fix javadoc checkstyle issues
...
Fix checkstyle violations for javadoc.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Sam Brannen
4184ebe799
Polish profile expression support
...
Issue: SPR-12458
2018-06-16 21:40:22 +03:00
Stephane Nicoll
1f3b4f1863
Polish "Add profile expression support"
...
Issue: SPR-12458
2018-06-15 16:01:16 +02:00
Juergen Hoeller
0dc434b35e
Polishing
2018-06-13 22:04:10 +02:00
Juergen Hoeller
9aed9bf823
Allow for custom ScheduledTaskRegistrar and/or ScheduledMethodRunnable
...
Issue: SPR-16834
Issue: SPR-16812
2018-06-13 22:03:01 +02:00
Juergen Hoeller
b71795ba36
Restore original DefaultLifecycleProcessor behavior for the time being
...
Issue: SPR-16901
2018-06-10 23:52:27 +02:00
Brian Clozel
0092653d42
Fix JDK9 build after Groovy 2.5 upgrade
...
After the Groovy 2.5 upgrade, the Spring Framework build on JDK9 hit
GROOVY-8631. Adding the relevant `jax-api` dependency to the module
didn't fix this issue. The Groovy release notes mention the use of the
`--add-modules` JVM flag, but this is not an option for this build which
should run on JDK8 -> JDK11.
This commit changes the dependency from `groovy-all` to more focused
dependencies on Groovy in the `spring-beans` and `spring-context`
modules. This change seems to avoid the automatic loading of Groovy
enhancements to JAXB (shipped with `groovy-xml`).
See:
* http://groovy-lang.org/releasenotes/groovy-2.5.html#Groovy2.5releasenotes-Knownissues
* https://issues.apache.org/jira/browse/GROOVY-8631
Issue: SPR-15407
2018-06-08 13:37:44 +02:00
Juergen Hoeller
6cf197864c
DefaultLifecycleProcessor properly handles count for dependent beans
...
Issue: SPR-16901
2018-06-06 21:25:26 +02:00
Stephane Nicoll
f1871f9e3f
Fix faulty BeanPostProcessorChecker logs with @EnableCaching
...
Issue: SPR-16896
2018-06-04 14:51:14 +02:00
Sebastien Deleuze
b71d0eeec9
Fix Kotlin bean DSL conditional handling
...
Issue: SPR-16412
2018-06-01 14:40:27 +02:00
Juergen Hoeller
356bfe6e2e
Upgrade to Joda-Time 2.10
2018-05-31 23:35:15 +02:00
Sebastien Deleuze
a7a29a8226
Revisit PropertyResolver Kotlin extensions
...
Issue: SPR-16883
2018-05-31 12:20:37 +02:00
Juergen Hoeller
1b728fb244
Polishing
2018-05-30 11:10:37 +02:00
Juergen Hoeller
b39ce80c87
Doc: @EnableScheduling needs to be declared per application context
...
Issue: SPR-16852
2018-05-29 21:52:51 +02:00
Juergen Hoeller
46a89d9534
Restore lenient null return value for ConditionContext.getBeanFactory()
...
Includes nullable return value for getClassLoader() with corresponding notes in applicable javadoc.
Issue: SPR-16866
2018-05-29 21:51:06 +02:00
Juergen Hoeller
5bbeadec0c
Detect nested configuration classes even for empty outer classes
...
Issue: SPR-16839
2018-05-29 21:47:53 +02:00
Sebastien Deleuze
be416ef9c4
Polish BeanDefinitionDsl
...
Issue: SPR-16412
2018-05-29 09:34:35 +02:00
Juergen Hoeller
5b3bbad6a0
ConcurrentModel.addAttribute javadoc: null value not supported
...
Issue: SPR-16831
2018-05-18 22:20:08 +02:00
Juergen Hoeller
795e5d306c
Upgrade to JSR-354 Money & Currency API 1.0.3 and Moneta 1.2.1
2018-05-05 20:38:28 +02:00
Johnny Lim
fb898e1727
Remove inconsistent spaces
2018-05-05 11:07:35 +02:00
Juergen Hoeller
9281f820f1
Expose FactoryBean's raw object on retrieval during post-processing
...
Issue: SPR-16783
2018-05-02 15:21:40 +02:00
Juergen Hoeller
c8b6233bd0
Introspect originating bean definition as configuration class candidate
...
Issue: SPR-16756
2018-05-02 15:20:42 +02:00
Juergen Hoeller
ad0d79a97b
Lenient fallback to plain getBundle call without Control handle
...
Includes defaultEncoding variant for platform default encoding.
Issue: SPR-16776
2018-05-01 23:50:34 +02:00
Juergen Hoeller
d5aedac6db
Avoid custom ResourceBundle.Control on Jigsaw (as far as possible)
...
Issue: SPR-16776
2018-04-27 18:24:31 +02:00
Juergen Hoeller
eaff2c28a7
Consistent target method resolution for event and caching expressions
...
Issue: SPR-16779
2018-04-27 18:23:42 +02:00
Juergen Hoeller
aa11721ff0
AopUtils.getMostSpecificMethod exposes dynamic proxy class methods
...
Includes efficient canApply check for IntroductionAwareMethodMatcher.
Issue: SPR-16757
2018-04-27 18:23:34 +02:00
Juergen Hoeller
a2a8d0c754
Workaround for generic parameter types on inner class constructors
...
Issue: SPR-16734
2018-04-17 12:58:32 +02:00
Juergen Hoeller
d4a55a257b
OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
...
Issue: SPR-16731
2018-04-17 11:10:15 +02:00
Juergen Hoeller
b95e05db04
AspectJExpressionPointcut consistently resolves superinterface methods
...
Includes efficient check for same ClassLoader in ClassUtils.isVisible, efficient MethodMatchers check for IntroductionAwareMethodMatcher, and supertype method resolution in MethodMapTransactionAttributeSource.
Issue: SPR-16723
2018-04-14 15:10:05 +02:00
sdeleuze
97ee94f4ca
Expose env and context in Kotlin beans DSL
...
This commit introduces a deferred initialization of the declared beans
in order to make it possible to access to the environment (and even
to the context for advanced use-cases) in the beans { } Kotlin DSL.
Issues: SPR-16269, SPR-16412
2018-04-12 11:31:37 +02:00
Juergen Hoeller
61c3db0869
MethodHandles.Lookup.defineClass for CGLIB class definition purposes
...
Spring's CGLIB fork is patched with local copies of affected files here, introducing the notion of a "contextClass" (e.g. the proxy superclass) which gets passed through to ReflectUtils.defineClass for delegating to MethodHandles.Lookup.defineClass eventually, against a privateLookupIn(contextClass) lookup context on JDK 9/10/11.
Issue: SPR-15859
2018-04-11 12:47:55 +02:00
Juergen Hoeller
cdaa247861
Unwind _TestTypes to top-level public test classes in AOP test suite
2018-04-11 12:43:49 +02:00
Juergen Hoeller
6102715b8d
Consistent treatment of proxy classes and interfaces for introspection
...
Issue: SPR-16675
Issue: SPR-16677
2018-04-03 02:42:41 +02:00
Juergen Hoeller
cc379f1cc7
Polishing
2018-04-01 12:57:19 +02:00
Juergen Hoeller
bc07a54075
Clear AnnotationUtils cache after context refresh (along with others)
...
Issue: SPR-16675
2018-03-31 23:08:30 +02:00
Juergen Hoeller
912c270f2b
Polishing
2018-03-31 17:49:21 +02:00
Juergen Hoeller
4da27c2a73
Avoid unnecessary introspection on methods and meta-annotations
...
Issue: SPR-16667
2018-03-31 00:18:14 +02:00
Juergen Hoeller
78681c6369
JndiRmiServiceExporter still calls PortableRemoteObject when available
...
Issue: SPR-16670
2018-03-30 15:19:38 +02:00
Juergen Hoeller
d553ddc5b3
Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)
...
Issue: SPR-15756
2018-03-29 23:50:17 +02:00
igor-suhorukov
e6020ed377
avoid unnecessary autoboxing
2018-03-28 23:48:12 +02:00
Stephane Nicoll
d1a0b8d53f
Clarify the format supported by @PropertySource
...
Issue: SPR-16563
2018-03-28 11:03:53 +02:00