Commit Graph

3242 Commits

Author SHA1 Message Date
Sam Brannen 727aa517d8 Merge branch '5.3.x' 2022-11-08 16:34:40 +01:00
Sam Brannen f4b3333fa8 Avoid reflection for annotation attribute method invocations
As a follow up to 332b25b680, this commit consistently avoids the use of
reflection for annotation attribute method invocations.

See gh-29301
Closes gh-29448
2022-11-08 16:23:33 +01:00
Sébastien Deleuze 60c9f2f72f Add support for Jackson annotations in BindingReflectionHintsRegistrar
This commits registers reflection hints on field and methods
where Jackson annotations are detected.

Closes gh-29426
2022-11-08 16:19:27 +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 ac5eb9bfd3 Avoid String allocations with Assert.isTrue() 2022-11-05 14:51:36 +01:00
Sam Brannen 82823517fa Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/broker/OrderedMessageChannelDecorator.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java
#	spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java
#	spring-web/src/main/java/org/springframework/http/HttpRange.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/socket/CloseStatus.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/RedirectViewControllerRegistration.java
2022-11-05 14:50:18 +01:00
Sam Brannen 5f02323b9c Avoid String allocations with Assert.isTrue() 2022-11-05 14:40:45 +01:00
Sam Brannen d849f9816a Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateView.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java
2022-11-04 16:29:54 +01:00
Sam Brannen a281d8c3fd Polishing 2022-11-04 16:24:59 +01:00
Sam Brannen 34b1857236 Avoid String allocations with Assert.state() 2022-11-04 15:51:32 +01:00
Sébastien Deleuze bfe37c290e Refine PreComputeFieldFeature logging
Closes gh-29406
2022-11-02 07:57:49 +01:00
Johnny Lim 85d029f7c3 Polishing
Closes gh-29410
2022-11-01 15:22:49 +01:00
Sam Brannen c3fca0a826 Always register root directory for registered resource hints
See gh-29403
2022-10-31 14:21:07 +01:00
Sam Brannen 29f085bd1a Automatically register directories for registered resource hints
When a hint such as `graphql/*.*` is registered for resources that are
looked up via classpath scanning using a pattern such as
`classpath*:graphql/**/*.graphqls`, an appropriate pattern is in fact
registered in the generated `resource-config.json` file for GraalVM
native images; however, classpath scanning fails since GraalVM
currently does not make the `graphql` directory automatically available
as a classpath resource.

This can be very confusing and cumbersome for users since a file such
as `graphql/schema.graphqls` will not be discovered via classpath
scanning even though the file is present in the native image filesystem.

To address this, this commit automatically registers resource hints for
enclosing directories for a registered pattern.

If the GraalVM team later decides to perform automatic directory
registration, we can then remove the code introduced in conjunction
with this issue.

Closes gh-29403
2022-10-30 19:02:39 +01:00
Sam Brannen d03102edc3 Allow registration of resource hint for root directory
Prior to this commit, it was not possible to register the root
directory as a native image resource; however, it is necessary to be
able to register the root directory to enable classpath scanning of the
root directory within a native image -- for example, to support
resource patterns such as `classpath*:/*.properties`.

This commit therefore relaxes the precondition check in the
ResourcePatternHint constructor to allow explicit registration of the
root directory.

Closes gh-29402
2022-10-30 18:18:07 +01:00
Sam Brannen 3c42363ba4 Do not close GraalVM Native image FileSystem after classpath scanning
As can be seen in a modified version of the following example project,
attempting to access a resource discovered via classpath scanning
within a GraalVM native image -- for example via the Files.exists(...)
invocation in FileSystemResource -- currently results in a
ClosedFileSystemException since PathMatchingResourcePatternResolver
explicitly closes the native image FileSystem that backs `resource:`
resources.

Sample project: https://github.com/joshlong/spring-boot-3-aot-graphql

To address this issue, this commit removes the explicit close()
invocation for custom FileSystems after classpath scanning in
PathMatchingResourcePatternResolver.

See https://github.com/spring-projects/spring-graphql/issues/495
Closes gh-29397
2022-10-28 21:23:03 +02:00
Sam Brannen f16366e161 Introduce SimpleValueStyler for use with ToStringCreator
DefaultValueStyler hard codes conventions for styling that are verbose
and do not align well with standard toString() implementations in the
JDK for arrays, collections, and maps. Furthermore, the default styling
for classes and methods may not be suitable or desirable for certain
use cases.

To address these shortcomings, this commit introduces a
SimpleValueStyler for use with ToStringCreator. The default behavior of
SimpleValueStyler aligns with toString() implementations for arrays,
collections, and maps in the JDK, and styling for classes and methods
is configurable via a dedicated constructor.

Closes gh-29381
2022-10-25 17:42:19 +02:00
Sam Brannen 388f7bffcb Make DefaultValueStyler extensible
The `style(Object)` method in DefaultValueStyler delegates to several
internal methods. Prior to this commit those methods were private,
which prevented users from extending DefaultValueStyler without
rewriting most of the functionality.

This commit addresses this by making those methods protected so that
DefaultValueStyler can be extended. In addition, this commit introduces
protected methods for styling null, strings, classes, methods, and
objects that are not covered by any of the other style*() methods.

Closes gh-29380
2022-10-25 17:40:09 +02:00
Sam Brannen 7f4dbdb280 Polish DefaultValueStylerTests 2022-10-25 17:35:39 +02:00
Sam Brannen 5070604d4e Polish ToStringCreatorTests 2022-10-25 15:25:11 +02:00
rstoyanchev d76953c166 Merge branch '5.3.x' 2022-10-24 11:11:59 +01:00
rstoyanchev 3d89acf9ea Adjust checkForLeaks timeout settings
LeakAwareDataBufferFactory#checkForLeaks automatically waits up to 5
sec for buffers to be released, which could be used as a way of
awaiting on some async logic to complete, and as long as buffers are
released, it shouldn't be long. However, the leak test in
LeakAwareDataBufferFactoryTests actually expects to find a leak, and
always ends up waiting the full 5 seconds.

This change, makes the wait configurable, with the no-arg method
using 0 (no waiting). AbstractLeakCheckingTests uses 1 second by
default since ResourceRegionEncoderTests did fail locally. If more
tests need this, we can adjust the settings.
2022-10-24 10:55:39 +01:00
Sam Brannen 53f513f90c Suppress deprecation warnings in tests 2022-10-20 16:57:40 +02:00
Sébastien Deleuze 0889e47608 Upgrade to GraalVM 22.3 and introduce PreComputeFieldFeature
This new GraalVM feature replaces ConstantFieldFeature and
introduces various enhancements:
 - Leverage the new FieldValueTransformer API
 - Use GraalVM 22.3 graal-sdk dependency instead of svm one
 - Avoid using internal GraalVM APIs
 - No need to configure JPMS exports
 - Directly integrated in spring-core module
 - Simplified build configuration

Closes gh-29081
Closes gh-29080
Closes gh-29089
2022-10-19 20:35:54 +02:00
rstoyanchev bd59c7a691 Polishing contribution
Closes gh-29310
2022-10-19 13:22:38 +01:00
Violeta Georgieva 997d1b3d7e Enable leak detection in Netty 5 tests
See gh-29310
2022-10-19 12:07:40 +01:00
Juergen Hoeller dbcfeb8f4f Aligned with PathMatchingResourcePatternResolverTests on main
See gh-29333
2022-10-18 23:04:44 +02:00
Juergen Hoeller d17cdf98bb Restore directory matching (explicitly excluding root path itself)
Closes gh-29333
2022-10-18 19:29:29 +02:00
Sébastien Deleuze d89865ad67 Check @RegisterReflectionForBinding specifies at least one class
Closes gh-29346
2022-10-18 19:07:54 +02:00
Sébastien Deleuze 03039fcc00 Refine @RegisterReflectionForBinding Javadoc
Provide a better Javadoc to clarify that @RegisterReflectionForBinding
should annotate a bean and that the types where reflection is needed
should be specified in the annotation attributes.

Closes gh-29345
2022-10-18 19:07:54 +02:00
Sam Brannen 004875670b Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-18 18:00:44 +02:00
Sam Brannen 652781c4a1 Test status quo in 5.3.x for PathMatchingResourcePatternResolver
See gh-29333
2022-10-18 17:51:29 +02:00
Sam Brannen b2cf2b9d48 Remove unused logger field 2022-10-18 14:19:45 +02:00
Sam Brannen 9dfa46f690 Remove GraalVM workaround in PathMatchingResourcePatternResolver
Tested successfully using the following locally built GraalVM dev build.

OpenJDK Runtime Environment GraalVM 22.3.0-dev (build 17.0.5+5-jvmci-22.3-b07)

Closes gh-29214
2022-10-18 14:18:05 +02:00
Sébastien Deleuze 3d83db6abb Mention @ImportRuntimeHints in RuntimeHintsRegistrar Javadoc
Closes gh-29337
2022-10-18 12:24:46 +02:00
Sam Brannen 4d44aaf81b Omit deprecation warning for Bean Validation constraint annotations
Prior to this commit, AnnotationTypeMapping logged a warning for the use
of convention-based annotation attribute overrides in composed Bean
Validation constraint annotations, even though those attribute overrides
are not related to Spring.

For example, Hibernate's @URL constraint annotation is meta-annotated
with Bean Validation's @Pattern constraint annotation, and we should not
log a warning in such scenarios.

This commit addresses that by not logging a warning if convention-based
annotation attribute overrides are detected for a composed @Constraint
annotation.

Closes gh-29206
2022-10-17 19:39:02 +02:00
Sam Brannen 0e861af050 Log warning for convention-based attribute overrides once per annotation type
See gh-28760, gh-29206
2022-10-17 16:52:17 +02:00
Sébastien Deleuze 69cb68f7d6 Add Kotlin data class components support to BindingReflectionHintsRegistrar
Closes gh-29316
2022-10-17 12:26:45 +02:00
Johnny Lim eeebea1da3 Replace StringBuffer with StringBuilder in CGLIB fork 2022-10-14 18:45:08 +02:00
Juergen Hoeller bba313c2f5 Perform basic property determination without java.beans.Introspector
Closes gh-29320
2022-10-13 19:02:45 +02:00
Juergen Hoeller 7025c3bbd4 Upgrade to ASM 9.4
Closes gh-29305
2022-10-12 08:32:42 +02:00
Sam Brannen 313b53a62a Merge branch '5.3.x' 2022-10-11 20:50:33 +02:00
Sam Brannen 5ac687f4aa Add warning to AnnotatedElementUtils.getMergedRepeatableAnnotations()
See gh-20279
2022-10-11 20:49:19 +02:00
Sam Brannen 0ed3a46a2a Merge branch '5.3.x' 2022-10-11 19:39:20 +02:00
Sam Brannen 332b25b680 Support searches for non-public repeatable annotations
Prior to this commit, searches for non-public repeatable annotations
failed with error messages similar to the following, since the
repeatable annotation's container's `value()` method could not be
invoked via reflection.

JDK 8:

java.lang.IllegalAccessError: tried to access class
org.springframework.core.annotation.NestedRepeatableAnnotationsTests$A
from class com.sun.proxy.$Proxy12

JDK 17:

java.lang.IllegalAccessError: failed to access class
org.springframework.core.annotation.NestedRepeatableAnnotationsTests$A
from class jdk.proxy2.$Proxy12
(org.springframework.core.annotation.NestedRepeatableAnnotationsTests$A
is in unnamed module of loader 'app'; jdk.proxy2.$Proxy12 is in module
jdk.proxy2 of loader 'app')

This commit makes it possible to search for non-public repeatable
annotations by first attempting to invoke the repeatable annotation's
container's `value()` method via the container's InvocationHandler (if
the container is a JDK dynamic proxy) and then falling back to
reflection for the method invocation if an error occurs (such as a
SecurityException).

Closes gh-29301
2022-10-11 19:27:40 +02:00
Sam Brannen 48a9fd815f Merge branch '5.3.x' 2022-10-11 18:11:29 +02:00
Sam Brannen 9876701493 Support nesting in AnnotatedElementUtils.getMergedRepeatableAnnotations()
This commit is a follow up to 828f74f71a
and applies to same fix for getMergedRepeatableAnnotations().

See the previous commit for details.

Closes gh-20279
2022-10-11 18:06:00 +02:00
Sam Brannen 65ab67ef2b Merge branch '5.3.x' 2022-10-11 17:36:08 +02:00
Sam Brannen 828f74f71a Support nesting in AnnotatedElementUtils.findMergedRepeatableAnnotations()
Prior to this commit, the findMergedRepeatableAnnotations() methods in
AnnotatedElementUtils failed to find repeatable annotations declared
on other repeatable annotations (i.e., when one repeatable annotation
type was used as a meta-annotation on a different repeatable annotation
type).

The reason is that
findMergedRepeatableAnnotations(element, annotationType, containerType)
always used RepeatableContainers.of(annotationType, containerType) to
create a RepeatableContainers instance, even if the supplied
containerType was null. Doing so restricts the search to supporting
only repeatable annotations whose container is the supplied
containerType and prevents the search from finding repeatable
annotations declared as meta-annotations on other types of repeatable
annotations.

Note, however, that direct use of the MergedAnnotations API already
supported finding nested repeatable annotations when using
RepeatableContainers.standardRepeatables() or
RepeatableContainers.of(...).and(...).and(...). The latter composes
support for multiple repeatable annotation types and their containers.

This commit addresses the issue for findMergedRepeatableAnnotations()
when the containerType is null or not provided.

However, findMergedRepeatableAnnotations(element, annotationType, containerType)
still suffers from the aforementioned limitation, and the Javadoc has
been updated to make that clear.

Closes gh-20279
2022-10-11 17:21:28 +02:00
Sam Brannen 965dd66f8c Improve Javadoc for RepeatableContainers 2022-10-11 16:41:19 +02:00
Juergen Hoeller bba66429fb Polishing 2022-10-11 15:35:25 +02:00
Juergen Hoeller 4bb2e23239 Resolve CGLIB core<->transform package cycle
See gh-28955
2022-10-11 15:34:07 +02:00
Juergen Hoeller c94b676576 Specifically handle "java."/"javax." packages in SpringNamingPolicy
Closes gh-27622
2022-10-10 21:50:26 +02:00
Sébastien Deleuze 7b4ff5ea74 Make BindingReflectionHintsRegistrar protected methods private
In order to keep the maximum of flexibility, this commit makes
shouldSkipType and shouldSkipMembers methods private.

That will allow for example to refactor
BindingReflectionHintsRegistrar in order to support skipping
custom classes specified via @RegisterReflectionForBinding
without having to subclass it.

See gh-29279
2022-10-10 18:18:36 +02:00
Juergen Hoeller a1daaf0c19 Revise CGLIB naming policy to only contain SpringCGLIB label once
See gh-29295
2022-10-10 17:34:31 +02:00
Juergen Hoeller 26c6a742d9 Introduce setLoadedClassHandler method on CGLIB ReflectUtils
See gh-29295
2022-10-10 16:49:55 +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
Sam Brannen ae368a20b8 Merge branch '5.3.x'
# Conflicts:
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt
2022-10-08 14:06:41 +02:00
Johnny Lim 1c1a0afbed Use AssertJ static imports consistently in 5.3.x
Closes gh-29282
2022-10-08 13:57:21 +02:00
Sam Brannen c98ed17728 Polishing 2022-10-08 13:43:09 +02:00
Johnny Lim ced37d53b4 Polishing
Closes gh-29284
2022-10-08 13:43:09 +02:00
Sébastien Deleuze a9cd45e7f2 Improve BindingReflectionHintsRegistrar extensibility
This commit introduces a shouldSkipType(Class<?> type) method
and changes shouldRegisterMembers(Class<?> type) to
shouldSkipMembers(Class<?> type).

Closes gh-29279
2022-10-07 17:50:15 +02:00
Sébastien Deleuze bbe285dd42 Polish RegisterReflectionForBinding support
Implementation and Javadoc refinements.

See gh-29279
2022-10-07 17:50:15 +02:00
Sam Brannen 1d052742d1 Throw IOException in FileSystemResource.getURI() for consistency
See gh-29275
2022-10-07 17:06:54 +02:00
Sam Brannen 66989434b4 Introduce unit tests for gh-29275 2022-10-07 14:02:11 +02:00
Sam Brannen 23b3fc7f3c Polish FileSystemResource 2022-10-07 14:01:07 +02:00
Sam Brannen 7175c4ca9a Normalize URIs returned from FileSystemResource.getURI()
Prior to this commit, if a FileSystemResource was created from a
java.nio.file.Path or java.nio.file.FileSystem, the URI returned from
getURI() was based on the semantics of Path#toUri() which always
includes the "authority component" (i.e., "//") after the scheme (e.g.,
"file://..."). In contrast, if a FileSystemResource is created from a
java.io.File or String, the URI returned from getURI() never includes
the "authority component" due to the semantics of File#toURI().

Consequently, invoking myFileSystemResource.getURI().toString() could
result in "file:/my/path" or "file:///my/path", depending on how the
FileSystemResource was created.

This behavior is not new; however, recent changes in
PathMatchingResourcePatternResolver -- which result in a
FileSystemResource being created from a java.nio.file.Path instead of
from a java.io.File -- make this difference more noticeable to users
and may in fact surface as a breaking change.

To address that issue, this commit revises the implementation of
FileSystemResource.getURI() by normalizing any `file:` URIs that it
returns. Effectively, URIs like "file:///my/path" will now take the
form "file:/my/path".

See gh-29163
Closes gh-29275
2022-10-07 13:27:08 +02:00
Sam Brannen af617c7da9 Disable failing test until gh-29275 is addressed 2022-10-07 12:40:55 +02:00
Sam Brannen c405e742f4 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-07 12:39:24 +02:00
Sam Brannen 8caed88c14 Test status quo for URI/URL for scanned filesystem resources
See gh-29275
2022-10-07 12:17:27 +02:00
Stephane Nicoll 635534c1ad Describe naming conventions of GeneratedMethods#add
Closes gh-28997
2022-10-07 12:05:57 +02:00
Sam Brannen 3dc60f1627 Backport changes to PathMatchingResourcePatternResolverTests 2022-10-07 11:01:02 +02:00
Juergen Hoeller b45a48461f Polishing 2022-10-06 12:03:25 +02:00
Stephane Nicoll efaee61f31 Harmonize accessors of RuntimeHints API
Closes gh-29269
2022-10-06 09:36:17 +02:00
Sam Brannen 30f1eee4d0 Polish Javadoc and implementation of ClassPathResource 2022-10-05 20:24:17 +02:00
Sam Brannen 8869ca27b1 Ensure ClassPathResources with same path have same hash code
This commit aligns the hashCode() implementation in ClassPathResource
with the recent change to the logic in equals().

See gh-29263
2022-10-05 16:58:08 +02:00
Sam Brannen 1082119c50 Polishing 2022-10-05 16:49:38 +02:00
Sam Brannen a380ca2750 Ensure ClassPathResources with same path and ClassLoader are equal
Prior to this commit, if two ClassPathResource instances were
constructed differently (one from an absolute path and one from a path
relative to a Class) but had the same absolute path and the same
ClassLoader, they were effectively equal, but ClassPathResource#equals
returned false.

This commit addresses this by revising the logic in
ClassPathResource#equals accordingly.

Closes gh-29263
2022-10-05 16:27:02 +02:00
Sam Brannen 0aa9d9d535 Return URL-decoded file name from UrlResource#getFilename()
Prior to this commit, UrlResource#getFilename() returned the filename
of the resource URL-encoded which is in contrast to what
FileSystemResource#getFilename() returns for an equivalent resource.

In addition, users most likely expect that a filename returned from a
method defined in the Resource interface is unencoded.

This commit therefore revises UrlResource#getFilename() so that it
always returns the filename URL-decoded.

Closes gh-29261
2022-10-05 15:52:22 +02:00
Sam Brannen 084d7d1bdc Remove duplicate ClassPathResourceTests class 2022-10-05 15:52:22 +02:00
Sam Brannen 2e05137ff9 Polish PathResourceTests 2022-10-05 15:52:22 +02:00
Sam Brannen f0556b6004 Undeprecate PathResourceTests 2022-10-05 15:52:22 +02:00
Stephane Nicoll f2e9d112b1 Fix TypeReference#getName for CGLIB proxies
This commit makes sure that the double '$' sign typically used by
generated cglib proxies are not used as an inner class separator.

Closes gh-29252
2022-10-04 16:49:13 +02:00
Sam Brannen 5bff2c7341 Clean up warnings in tests 2022-10-04 16:19:37 +02:00
Sam Brannen 31d98bfd95 Ensure PathMatchingResourcePatternResolverTests run in native image
See inline comments in commit for details.

See gh-29243
2022-10-04 16:13:46 +02:00
Sam Brannen dd814b6d30 Test sub-paths in PathMatchingResourcePatternResolverTests
This commit introduces assertions that verify that the sub-path is
properly URL-decoded when a path contains `#`. The additional assertions
are necessary since the existing assertions use Resource#getFilename
which already implicitly decodes the path.

See gh-29243
2022-10-04 15:50:33 +02:00
Sébastien Deleuze 5c447bb7a4 Make ConstantFieldSubstitutionProcessor thread-safe
See gh-29250
2022-10-04 15:23:18 +02:00
Sam Brannen ddc7aef51b Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-04 14:31:43 +02:00
Sam Brannen fee38175b3 Revert "Test encoding and Unicode normalization for scanned resources"
This reverts commit eb2c1cbcd4.
2022-10-04 14:29:22 +02:00
Sam Brannen 2ce314d4dd Modify PathMatchingResourcePatternResolverTests so that it passes on main
See gh-29243
2022-10-04 13:22:44 +02:00
Sam Brannen 5b08bc29b1 Merge branch '5.3.x' 2022-10-04 13:21:30 +02:00
Sam Brannen eb2c1cbcd4 Test encoding and Unicode normalization for scanned resources
This commit introduces tests which serve as "regression tests" for the
behavior of PathMatchingResourcePatternResolver in Spring Framework
5.3.x with regard to URL-encoding and Unicode normalization of resource
paths.

Specifically, the new tests demonstrate that resource paths do NOT need
to be decoded or normalized in 5.3.x.

See gh-29243
2022-10-04 13:19:59 +02:00
Juergen Hoeller 4a2b058b0a Enforce static initialization of CGLIB method proxies on attemptLoad
This propagates current Enhancer settings (naming strategy etc) to the method proxies.

See gh-29107
2022-10-04 12:24:09 +02:00
Sam Brannen 01025c8551 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-04 12:08:16 +02:00
Sam Brannen 7241c30141 Backport changes to PathMatchingResourcePatternResolverTests 2022-10-04 11:48:29 +02:00
Sébastien Deleuze 619b7bff17 Add ConstantReadableJavaField caching in ConstantFieldSubstitutionProcessor
Closes gh-29250
2022-10-04 11:03:48 +02:00
Brian Clozel 3b91eea0b7 Support parsing locales without country, with variant
Prior to this commit, the parsing algorithm in
`StringUtils#parseLocaleString` would skip empty tokens, turning
`en__VARIANT` into `en_VARIANT` when parsed.

This commit ensures that such cases are now supported and that more
invalid formats are rejected by the parser.

Fixes gh-29248
2022-10-03 22:44:09 +02:00
Violeta Georgieva b5adae2086 Switch to Reactor Netty 2 snapshots
Update to Reactor BOM 2022.0.0-SNAPSHOT.
Process package changes.
Adapt to new `HttpHeaders` API.
Adapt to new cookies API.

See gh-29247
2022-10-03 18:20:52 +01:00
Juergen Hoeller 1b1682eacd Narrow early initialization of CGLIB method proxies (for AOT processing)
Do not trigger early initialization on Factory classes (e.g. AOP proxies)

See gh-29107
2022-10-03 18:00:57 +02:00