Sam Brannen
796b8c1278
Polishing
2022-11-18 15:14:14 +01:00
Sam Brannen
cefd74555a
Polish contribution
2022-11-18 15:07:08 +01:00
wizard
e9555d4825
Polish AbstractAutowireCapableBeanFactory and use instanceof pattern matching
...
Closes gh-29499
2022-11-18 15:00:05 +01:00
Sam Brannen
abf3400c07
Use Assert.state() where appropriate
2022-11-15 12:31:10 +01:00
Sam Brannen
2aa78889d2
Use consistent wording in precondition error messages
2022-11-15 12:31:01 +01:00
Stephane Nicoll
711a63adca
Polish
...
See gh-29391
2022-11-15 11:53:01 +01:00
Juergen Hoeller
588a70218a
Merge branch '5.3.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
2022-11-14 23:38:10 +01:00
Juergen Hoeller
ec3f59e6fe
Allow AutoCloseable dereferences on original AutoCloseable beans
...
Closes gh-29480
2022-11-14 23:37:05 +01:00
Juergen Hoeller
49ee4a4fdf
Deprecated unused findAutowireCandidates template method (removed in 6.0)
...
See gh-29487
2022-11-14 23:35:47 +01:00
Juergen Hoeller
28cd39abf9
Remove unused AutowiredAnnotationBeanPostProcessor template methods
...
Closes gh-29487
2022-11-14 23:23:39 +01:00
Juergen Hoeller
aaeb5eb0d2
Avoid direct URL construction and URL equality checks
...
Closes gh-29486
2022-11-14 23:23:12 +01:00
Stephane Nicoll
da4b539f20
Stop generating generic type as Object for unresolved generics
...
Closes gh-29454
2022-11-09 12:00:34 +01:00
Juergen Hoeller
70bb785ed6
Turn nested generic FactoryBean type into resolved Class for fallback match
...
See gh-29385
2022-11-09 11:24:50 +01:00
Juergen Hoeller
0e9eab55ce
Unwrap nested generic type within FactoryBean target type if necessary
...
Closes gh-29385
2022-11-08 20:22:12 +01:00
Sam Brannen
f26a7dee97
Fix broken tests, update copyright dates, and polish
...
See gh-29414
2022-11-08 20:07:53 +01:00
Kulwant Singh
b2c8546013
Rely on automatic boxing/unboxing in tests
...
Closes gh-29414
2022-11-08 19:38:03 +01:00
Sam Brannen
d0b162a76c
Polishing
2022-11-08 14:16:00 +01:00
Juergen Hoeller
86d45578d9
Introduce findAllAnnotationsOnBean variant on ListableBeanFactory
...
Closes gh-29446
2022-11-08 13:29:33 +01:00
Sam Brannen
3438c47744
Polishing
2022-11-08 11:48:13 +01:00
Sam Brannen
34b1857236
Avoid String allocations with Assert.state()
2022-11-04 15:51:32 +01:00
Sébastien Deleuze
c091bbdeaa
Merge branch '5.3.x'
2022-11-02 12:18:15 +01:00
Sébastien Deleuze
c14cbd07f4
Use non-null DateFormat for CustomDateEditor in tests
...
Closes gh-29419
2022-11-02 12:01:49 +01:00
Sébastien Deleuze
403cfefc28
Add AOT processing of bean aliases
...
This commit adds AOT processing of bean aliases.
Closes gh-29391
2022-11-02 10:07:21 +01:00
Juergen Hoeller
6b6cf1b4a2
Avoid decorated definition bypass for scoped proxy determination
...
GenericApplicationContext registers proxy hints without any SmartInstantiationAwareBeanPostProcessor involved as well.
Closes gh-29335
2022-10-19 09:55:47 +02:00
Juergen Hoeller
cb44e09694
Merge branch '5.3.x'
2022-10-18 16:24:35 +02:00
Juergen Hoeller
4b0bf16389
Select ambiguous write method based on read method (matching its return type)
...
Also avoids unnecessary checks in name-based PropertyDescriptor constructor.
See gh-29320
2022-10-18 16:17:03 +02:00
Stephane Nicoll
6d688e196d
Restore support of list of inner bean definitions
...
This commit restores the support of multiple bean definitions being
specified in a `List` as a property value or constructor argument.
Rather than handling inner bean definitions externally, there are now
supported by BeanDefinitionPropertiesCodeGenerator, and list of such
type is handled transparently.
Closes gh-29075
2022-10-18 15:28:18 +02:00
Johnny Lim
1ea3f49eba
Add missing since on setCurrentlyInvokedFactoryMethod()
...
See gh-29326
2022-10-18 13:03:13 +02:00
Juergen Hoeller
e03abc94ff
Merge branch '5.3.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
# spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java
# spring-beans/src/main/java/org/springframework/beans/SimpleBeanInfoFactory.java
# spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
2022-10-17 12:56:19 +02:00
Juergen Hoeller
33023b240f
Provide optional SimpleBeanInfoFactory for better introspection performance
...
Closes gh-29330
2022-10-17 12:25:53 +02:00
Juergen Hoeller
c407dc3df8
Reset/rebuild BeanPostProcessorCache within full synchronization
...
Closes gh-29299
2022-10-17 12:25:35 +02:00
Juergen Hoeller
b796b52d4e
Extract SimpleBeanInfo adaptation into internal SimpleBeanInfoFactory
...
See gh-29320
2022-10-14 12:34:43 +02:00
Juergen Hoeller
bba313c2f5
Perform basic property determination without java.beans.Introspector
...
Closes gh-29320
2022-10-13 19:02:45 +02:00
Stephane Nicoll
061fa475ee
Avoid generated code in the javax package
...
This commit updates the existing logic to also exclude code generation
in the javax package.
Closes gh-29123
2022-10-10 15:09:00 +02:00
Sam Brannen
34e5aac0f5
Reintroduce factory method name in exception thrown from SimpleInstantiationStrategy
2022-10-10 14:28:35 +02:00
Sébastien Deleuze
42c3ac64ff
Remove spring.spel.ignore and spring.xml.ignore flags
...
This commit also removes ResourcePropertiesPersister which
was introduced in 5.3 specifically for spring.xml.ignore
flag and which is expected to be used only internally by
Spring Framework. DefaultPropertiesPersister should be used
instead.
Closes gh-29277
2022-10-10 12:11:19 +02:00
Johnny Lim
ced37d53b4
Polishing
...
Closes gh-29284
2022-10-08 13:43:09 +02:00
Stephane Nicoll
c74760540d
Polish
2022-10-07 11:42:55 +02:00
Stephane Nicoll
a16afe8e10
Describe the replacement use case for BeanRegistrationAotProcessor
...
Closes gh-29126
2022-10-06 16:42:17 +02:00
Juergen Hoeller
6027be5a39
Ignore overridden factory methods for unique candidate resolution
...
See gh-27920
2022-10-06 15:06:53 +02:00
Stephane Nicoll
0d5c78d992
Polish
2022-10-06 13:33:58 +02:00
Juergen Hoeller
b45a48461f
Polishing
2022-10-06 12:03:25 +02:00
Juergen Hoeller
aedef9321a
Merge AOT constructor and factory method resolution into ConstructorResolver
...
This moves related code into the same class, unifies candidate determination for constructors and factory methods, and gets rid of the package cycle around the hard-coded Autowired annotation check (which is implicitly coming from AutowiredAnnotationBeanPostProcessor via the determineCandidateConstructors SPI now). The API entry point for AOT pre-resolution purposes is in RegisteredBean.
Closes gh-27920
2022-10-06 11:59:11 +02:00
Stephane Nicoll
2f20d6322b
Enable cglib proxy for configuration classes if necessary
...
This commit updates code generation to customize the instantiation of
a configuration class that requires a proxy. Rather than instantiating
the raw class, the proxy is used.
Closes gh-29107
2022-10-04 16:54:44 +02:00
Stephane Nicoll
9820e3341d
Fix handling of protected visibility
...
Previously, InstanceSupplierCodeGenerator used reflection if the target
visibility is either protected or private, and use direct access if the
target visibility is public or package private.
The previous arrangement already assumed that the code is generateed in
the same package as the target type. This means that protected can be
used as well so this commit only use reflection if the target visibility
is private.
Closes gh-29253
2022-10-04 16:49:13 +02:00
Stephane Nicoll
3b2b36d0b8
Allow AccessControl to determine visibility from a given type
...
This commit adapts AccessVisibility so that it can determine if the
member or type signature is accessible from a given package. This lets
implementers figure out if reflection is necessary without assuming that
package private visibility is OK.
Closes gh-29245
2022-10-03 17:56:19 +02:00
Brian Clozel
054579a892
Temporarily revert gh-29246
...
This new hint contribution triggers a GraalVM bug and breaks native
compilation for several samples, we need to temporarily revert this
change until a fix is available in GraalVM.
See gh-29246
2022-10-03 14:14:57 +02:00
Brian Clozel
ff9792bae0
Polish
...
See gh-29246
2022-10-03 14:14:01 +02:00
Brian Clozel
332961f833
Contribute introspection hints on registered beans
...
As a follow up of #29205 , we now need to contribute an "introspection on
declared method" reflection hint for all registered beans.
Closes gh-29246
2022-10-03 11:31:24 +02:00
Stephane Nicoll
0b5c3ec267
Polish javadoc
2022-10-03 10:05:27 +02:00