Commit Graph

4314 Commits

Author SHA1 Message Date
Juergen Hoeller 3632c09348 Merge branch '6.2.x' 2025-03-03 13:34:14 +01:00
Juergen Hoeller 5ffaea7a43 Avoid JarURLConnection resource leak in AbstractFileResolvingResource.exists()
Closes gh-34528
2025-03-03 13:32:51 +01:00
Sébastien Deleuze 7bc712e304 Upgrade NullAway to 0.12.4
This commit also slightly refines nullness but without
significant user-side impact expected.

Closes gh-34525
2025-03-03 08:45:54 +01:00
Juergen Hoeller b610711235 Merge branch '6.2.x' 2025-02-28 14:15:36 +01:00
Juergen Hoeller 559ea6c480 Defensively call isShutdown method for executor description
Closes gh-34514
2025-02-28 14:11:57 +01:00
Juergen Hoeller 03cce13937 Merge branch '6.2.x' 2025-02-27 22:54:07 +01:00
Juergen Hoeller 3bb4795d43 Resolve variable bounds at outermost recursion level only
Closes gh-34504
2025-02-27 22:51:41 +01:00
Brian Clozel 68e9460e9b Revisit compiler configuration in project build
This commit revisit the build configuration to enforce the following:

* A single Java toolchain is used consistently with a recent Java
  version (here, Java 23) and language level
* the main source is compiled with the Java 17 "-release" target
* Multi-Release classes are compiled with their respective "-release"
  target. For now, only "spring-core" ships Java 21 variants.

Closes gh-34507
2025-02-27 14:39:43 +01:00
Juergen Hoeller fb77fcd922 Merge branch '6.2.x' 2025-02-26 10:33:19 +01:00
Juergen Hoeller 06721ba6c0 Lenient fallback when cached WeakReference returns null
Closes gh-34423
2025-02-26 10:24:24 +01:00
Juergen Hoeller 7c4594c014 Merge branch '6.2.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/aot/hint/ResourceHints.java
#	spring-core/src/main/java/org/springframework/aot/hint/support/FilePatternResourceHintsRegistrar.java
2025-02-23 15:29:38 +01:00
Juergen Hoeller 634d1dd20b Consistent default ClassLoader fallback in hint classes
Closes gh-34470
2025-02-23 15:15:25 +01:00
Juergen Hoeller 1aea698088 Merge branch '6.2.x' 2025-02-23 14:04:31 +01:00
Juergen Hoeller 725b02a66d Ignore entries cache if no matching root entry path found
Closes gh-34446
2025-02-23 14:02:57 +01:00
Sam Brannen fe41cd6d20 Merge branch '6.2.x' 2025-02-13 16:39:21 +01:00
Sam Brannen 9e45178202 Stop referring to "Java 8" in AnnotationUtils 2025-02-13 15:59:20 +01:00
Sam Brannen d82e70e345 Cross reference annotation search APIs in Javadoc
Closes gh-34421
2025-02-13 15:59:08 +01:00
Juergen Hoeller 4d6947d14f Merge branch '6.2.x' 2025-02-12 19:20:01 +01:00
Juergen Hoeller bbb593db48 Consistently ignore non-jar files in classpath
Closes gh-34417
2025-02-12 19:18:30 +01:00
rstoyanchev e9d16da633 Remove Netty 5 support
Closes gh-34345
2025-02-11 12:27:33 +00:00
Juergen Hoeller 4ba14ca58c Merge branch '6.2.x' 2025-02-10 15:55:26 +01:00
Juergen Hoeller 1ca941ba9a Consistently resolve renamed type variables
Closes gh-34386
2025-02-10 15:51:39 +01:00
Sam Brannen 1a29fbda48 Restore @⁠Nullable on AnnotatedElementUtils.getAllAnnotationAttributes(...)
Closes gh-34394
2025-02-10 10:52:32 +01:00
Juergen Hoeller 3fff3b8a6d Merge branch '6.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java
#	spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
2025-02-07 19:03:37 +01:00
Juergen Hoeller 1a573d6e3c Lazily retrieve TypeDescriptor annotations on demand
Closes gh-33948
2025-02-07 18:55:24 +01:00
rstoyanchev 55a090602b Merge branch '6.2.x' 2025-02-07 13:23:14 +00:00
rstoyanchev ff49b0b683 Align AnnotatedMethod#equals and #hashcode
See gh-34375
2025-02-07 13:10:55 +00:00
Sébastien Deleuze 7695be0079 Merge branch '6.2.x' 2025-02-06 09:19:42 +01:00
Sébastien Deleuze dba4881318 Refine the CGLIB error message with native
See gh-34370
2025-02-06 09:18:51 +01:00
Sébastien Deleuze e44a3eb39a Merge branch '6.2.x' 2025-02-05 17:47:58 +01:00
Sébastien Deleuze 16ec08aec8 Provide a more actionable CGLIB error message with native
Closes gh-34370
2025-02-05 17:47:25 +01:00
Juergen Hoeller ecc7ddd96b Merge branch '6.2.x' 2025-01-31 22:28:50 +01:00
Juergen Hoeller 2df8ea94e0 Clean root entry path to match jar entries format in cache
Closes gh-34348
2025-01-31 22:26:14 +01:00
Juergen Hoeller 7405e20690 Merge branch '6.2.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/core/ResolvableType.java
2025-01-30 15:38:09 +01:00
Juergen Hoeller ed994dcd97 Resolve bounds for type variable before emptiness check
Closes gh-34328
2025-01-30 15:35:14 +01:00
Juergen Hoeller 4c3b435d23 Enforce exact match for bounds of nested type variable
Closes gh-34300
2025-01-30 15:34:55 +01:00
Johnny Lim 042b78f609 Fix Javadoc @code tags
Signed-off-by: Johnny Lim <izeye@naver.com>
2025-01-30 13:33:42 +09:00
Sam Brannen 5574f45cb1 Merge branch '6.2.x' 2025-01-27 15:22:10 +01:00
Sam Brannen 34d6dd9b62 Polishing 2025-01-27 15:19:00 +01:00
Sam Brannen 35fede1382 Polish Nullness 2025-01-23 11:16:00 +01:00
Sébastien Deleuze 8a89248b16 Refine Nullness Javadoc
See gh-34261
2025-01-22 13:21:17 +01:00
Brian Clozel f85752a956 Fix hints and predicates for Field reflective access
This commit revisits the arrangement for Field hints after changes made
in gh-34239.

Closes gh-34294
2025-01-21 20:05:12 +01:00
Juergen Hoeller 3302bc46f8 Merge branch '6.2.x' 2025-01-21 19:16:08 +01:00
Juergen Hoeller 90423a98b0 Enforce match for resolved part of unresolvable target type
Closes gh-34298
2025-01-21 19:15:20 +01:00
Brian Clozel 4763877259 Merge branch '6.2.x' 2025-01-21 17:27:54 +01:00
Brian Clozel e9dc6be51c Fix Javadoc for field reflection hints
Closes gh-34297
2025-01-21 17:25:15 +01:00
Sam Brannen d888432dca Merge branch '6.2.x' 2025-01-21 17:23:28 +01:00
Sam Brannen 6863b904b5 Polish contribution
See gh-34295
2025-01-21 17:22:49 +01:00
Mengqi Xu 016a4c4260 Improve Javadoc for SpringProperties.getFlag()
getFlag() returns true when the property is equal, ignoring case, to the
string "true", not just "true"; "TrUe" also means true.

Closes gh-34295

Signed-off-by: Mengqi Xu <2663479778@qq.com>
2025-01-21 17:19:17 +01:00
Sébastien Deleuze 1115be581a Add primitive type support to Nullness
See gh-34261
2025-01-21 16:32:52 +01:00
Sébastien Deleuze b3e888279e Introduce Nullness API
This commit introduces a Nullness enum with related utility methods
in order to detect if a type usage, a field, a method return type or a
parameter is unspecified, nullable or not null.

JSpecify annotations are fully supported, as well as Kotlin null safety
and `@Nullable` annotations regardless of their package (from Spring,
JSR-305 or Jakarta set of annotations for example).

Closes gh-34261
2025-01-21 14:59:32 +01:00
Juergen Hoeller 001ccca5e6 Merge branch '6.2.x' 2025-01-20 18:18:48 +01:00
Juergen Hoeller ee60eb7207 Fall back to HTTP GET in case of 405 from HTTP HEAD
Closes gh-34217
2025-01-20 18:17:49 +01:00
Sam Brannen 7fedb9c1d4 Remove binary array name handling in ClassUtils.forName()
In ClassUtils.forName(), we originally delegated to
ClassLoader.loadClass(), which does not support loading classes from
binary names for arrays (such as "[[I" for "int[][]" or
"[Ljava.lang.String;" for "String[]"); whereas, Class.forName() does
support binary names for arrays.

However, in Spring Framework 5.1.1 we switched from using
ClassLoader.loadClass() to Class.forName() in ClassUtils.forName() (see
gh-21867), which makes our custom handling of binary names for arrays
in ClassUtils.forName() obsolete.

In light of that, this commit removes our custom binary array name
handling support from ClassUtils.forName().

Closes gh-34291
2025-01-20 16:16:05 +01:00
Stéphane Nicoll eda7af764b Merge branch '6.2.x' 2025-01-20 15:13:42 +01:00
Stéphane Nicoll 82bc4ff71d Handle TextPart with escaped separator
This commit harmonizes how a candidate value is parsed to extract its
key and default, if any. Rather than returning {@code null} if no
default is available, `splitKeyAndValue` now consistently returns a
non-null array.

This prevents an escaped separator character to be mistakenly identified
as a placeholder in certain cases.

Closes gh-34289
2025-01-20 15:04:06 +01:00
Sébastien Deleuze 1763334180 Refine KotlinDetector usages and implementation
This commit refines KotlinDetector usages and implementation in order
to remove preliminary KotlinDetector#isKotlinReflectPresent invocations
and to ensure that KotlinDetector methods are implemented safely and
efficiently for such use case.

Closes gh-34275
2025-01-20 12:34:28 +01:00
Sam Brannen 113c101bed Merge branch '6.2.x' 2025-01-18 17:03:31 +01:00
Sam Brannen 886ca7f2db Polish contribution and SimpleCommandLineArgs-related code
Closes gh-34282
2025-01-18 17:03:04 +01:00
puppy4c c463b937b8 Update Javadoc for SimpleCommandLinePropertySource
For ComandLineArgs, supplying the same option multiple times with
different values is valid, and the values will be stored in a List.

This commit also updates the Javadoc for SimpleCommandLineArgsParser.

See gh-34282

Signed-off-by: puppy4c <puppy4c@foxmail.com>
2025-01-18 16:26:14 +01:00
Juergen Hoeller c4fe18ca79 Fix merge result 2025-01-15 18:31:16 +01:00
Juergen Hoeller 38a41b6d01 Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-01-15 18:29:30 +01:00
Juergen Hoeller 70ceb3abdf Refer to local Consumer type instead of Kotlin test type 2025-01-15 17:41:22 +01:00
Sam Brannen 9cfece0d54 Fix compilation error in ResolvableTypeTests 2025-01-15 17:29:01 +01:00
Sam Brannen 00ee0ab99c Fix compilation error in ResolvableTypeTests 2025-01-15 17:20:19 +01:00
Stéphane Nicoll 2c749ebdb7 Merge branch '6.2.x' 2025-01-15 17:08:09 +01:00
Stéphane Nicoll fe5f5d53b2 Polish "Resolve base type in parameterized type if necessary"
See gh-34086
2025-01-15 17:06:05 +01:00
Roland Praml 033d277bcf Resolve base type in parameterized type if necessary
See gh-34086
2025-01-15 17:03:20 +01:00
Juergen Hoeller 7e71001896 Merge branch '6.2.x' 2025-01-15 15:03:38 +01:00
Juergen Hoeller 227385083d Restrict lenient nested matching to immediate type variable
Includes fix for matching multiple wildcard bounds properly.

Closes gh-34119
Closes gh-34234
2025-01-15 15:02:46 +01:00
Sébastien Deleuze 9d9383aaeb Specify generic type nullness in spring-core
Also in spring-core-test.

See gh-34140
2025-01-14 12:35:02 +01:00
Brian Clozel c02251672e Polishing RuntimeHintsPredicates deprecations
This commit also deprecates the types returned by deprecated methods as
they will be removed as well in the future.

See gh-34239
2025-01-14 10:28:39 +01:00
Brian Clozel 9b17928143 Merge branch '6.2.x' 2025-01-13 20:21:40 +01:00
Brian Clozel 799566573a Fix Wrong parentId tracking in JFR application startup
This commit fixes the tracking of the main event parentId for the Java
Flight Recorder implementation variant.

Fixes gh-34128
2025-01-13 19:03:43 +01:00
Brian Clozel d28c0396c9 Update runtime hints predicates after GraalVM changes
As of gh-33847, method and field introspection is included by default
when a type is registered for reflection.
Many methods in ReflectionHintsPredicates are now mostly useless as their
default behavior checks for introspection.

This commit deprecates those methods and promotes instead invocation
variants. During the upgrade, developers should replace it for an
`onType` check if only reflection is required. If they were checking for
invocation, they should use the new 'onXInvocation` method.

Closes gh-34239
2025-01-13 15:34:34 +01:00
Juergen Hoeller b8c3f03ec0 Merge branch '6.2.x' 2025-01-12 18:13:04 +01:00
Juergen Hoeller 36fd82f32f Defensively resolve JarFile from JarURLConnection
Closes gh-34216
2025-01-12 18:07:09 +01:00
Juergen Hoeller 0f26f42da7 Defensively check for jar separator in jar entry names
Closes gh-34126
2025-01-12 18:05:49 +01:00
Juergen Hoeller c48fec885c Avoid caching invalid root directories
Closes gh-34111
2025-01-12 18:00:10 +01:00
Sébastien Deleuze 483985b173 Suppress serialization warnings
This commit suppresses serialization warnings triggered by the upgrade
of javac from 17 to 23.

See gh-34220
2025-01-09 16:01:30 +01:00
Brian Clozel 1b7ccbce2a Deprecate PathResource variant
This commit deprecates the `PathResource` implementation variant in
favor of `FileSystemResource`. This was already pointing to
`FileSystemResource` as of Spring Framework 5.1 and we now consider this
variant as deprecated.

Closes gh-34206
2025-01-07 16:09:37 +01:00
Sam Brannen 8bba4f641f Update copyright headers to 2025 2025-01-05 17:02:14 +02:00
Sam Brannen bc499df6ce Merge branch '6.2.x' 2025-01-05 17:01:12 +02:00
Sam Brannen 181db1db75 Update copyright headers to 2025 2025-01-05 17:00:47 +02:00
Sébastien Deleuze 57c0d95007 Fix detection of JSpecify annotations on parameters
See gh-28797
2025-01-03 17:29:49 +01:00
Stéphane Nicoll f136e27ccf Merge branch '6.2.x' 2025-01-03 16:54:32 +01:00
Stéphane Nicoll f802c0cf24 Restore use of MethodSource 2025-01-03 16:53:54 +01:00
Sam Brannen 087641c508 Merge branch '6.2.x' 2025-01-03 17:29:14 +02:00
Sam Brannen 2ba0022704 Polishing 2025-01-03 17:26:45 +02:00
Stéphane Nicoll c59ca087b4 Backport tests for exact match resolution
See gh-34124

(cherry picked from commit 898d3ec86a)
2025-01-03 17:10:17 +02:00
Sébastien Deleuze 08d7a38546 Merge branch '6.2.x' 2024-12-30 09:06:24 +01:00
Johnny Lim 6d86b23fbe Apply Checkstyle MethodParamPadCheck module
This commit also fixes its violations.

Closes gh-34173
2024-12-30 09:02:06 +01:00
Sébastien Deleuze 9516d9b822 Refine null-safety in the spring-jms module
Closes gh-34157
2024-12-26 15:18:27 +01:00
Sébastien Deleuze 4747ab67e6 Refine null-safety in the spring-core module
See gh-34150
2024-12-26 14:56:34 +01:00
Sébastien Deleuze 185537d469 Refine jsr305 dependency management
See gh-28797
2024-12-26 14:13:17 +01:00
Sébastien Deleuze cf90beec0a Refine null-safety in the spring-core module
Closes gh-34150
2024-12-24 16:46:00 +01:00
Sébastien Deleuze 1e0ef99b0c Leverage `@NullMarked` instead of package configuration
This commit replaces NullAway package configuration by package-level
`@NullMarked` detection by configuring `NullAway:AnnotatedPackages` to
an empty string.

NullAway configuration should be refined to use a proper flag instead
once uber/NullAway#574 is fixed.

See gh-28797
2024-12-23 17:14:29 +01:00
Stéphane Nicoll 950d0b5164 Merge branch '6.2.x' 2024-12-23 12:31:31 +01:00
Stéphane Nicoll 5ce5647d09 Restore support of exact match property
This commit fixes a regression in property placeholder resolution where
the original key was no longer considered for an exact match before
processing the placeholder itself.

By default, property resolution uses ':' as the separator between the
key and the fallback value.

Consider a request to resolve ${prefix://service}. Previously,
placeholder resolution would first attempt to resolve the raw text, that
is 'prefix://service', before attempting to resolve the 'prefix' key and
then use '//service' if the key did not resolve.

This commit restores that behaviour purely for backward compatible
reason.

Closes gh-34124
2024-12-23 12:19:45 +01:00
Sam Brannen 62d9600cdd Clean up warnings in Gradle build 2024-12-19 14:48:33 +01:00
Sébastien Deleuze b3586560c1 Add support for AnnotatedType in MethodParameter.hasNullableAnnotation
This commit adds support for detecting annotated types.

See gh-28797
2024-12-19 11:07:33 +01:00
Sébastien Deleuze 61545fabfc Deprecate Spring nullability annotations
JSpecify annotations should be used instead.

See gh-28797
2024-12-19 11:07:33 +01:00
Sébastien Deleuze 0e85d950b3 Remove unneeded `@NonNull` annotations
See gh-28797
2024-12-19 11:07:33 +01:00
Sébastien Deleuze bc5d771a06 Switch to JSpecify annotations
This commit updates the whole Spring Framework codebase to use JSpecify
annotations instead of Spring null-safety annotations with JSR 305
semantics.

JSpecify provides signficant enhancements such as properly defined
specifications, a canonical dependency with no split-package issue,
better tooling, better Kotlin integration and the capability to specify
generic type, array and varargs element null-safety. Generic type
null-safety is not defined by this commit yet and will be specified
later.

A key difference is that Spring null-safety annotations, following
JSR 305 semantics, apply to fields, parameters and return values,
while JSpecify annotations apply to type usages. That's why this
commit moves nullability annotations closer to the type for fields
and return values.

See gh-28797
2024-12-19 11:07:23 +01:00
Sam Brannen af83a152dc Polishing 2024-12-15 15:55:03 +01:00
Juergen Hoeller 3db1b94465 Replace spring-jcl with regular Apache Commons Logging 1.3
Closes gh-32459
2024-12-12 17:37:11 +01:00
Juergen Hoeller 41f8ac6b59 Merge branch '6.2.x' 2024-12-10 22:16:46 +01:00
Juergen Hoeller 7de1dc826a Consistently handle generics in TypeDescriptor.equals
Properly processes recursive types through always comparing generics via the top-level ResolvableType (rather than through nested TypeDescriptors with custom ResolvableType instances).

Closes gh-33932
2024-12-10 22:16:10 +01:00
Brian Clozel 78f28fda54 Merge branch '6.2.x' 2024-12-09 11:18:28 +01:00
Brian Clozel 13df9058a4 Introduce "unsafeAllocated" flag in TypeHint
This metadata information is required for supporting libraries using
`sun.misc.Unsafe#allocateInstance(Class<?>)`, even though Spring
Framework is not using this feature.

Closes gh-34055
2024-12-09 11:08:48 +01:00
Juergen Hoeller 5e62ae19a9 Merge branch '6.2.x' 2024-12-05 17:42:45 +01:00
Juergen Hoeller b5dd0a60f8 Restore lenient match against unresolvable wildcard
Closes gh-33982
2024-12-05 17:41:49 +01:00
Stéphane Nicoll b8cdef6d29 Merge branch '6.2.x' 2024-12-05 17:01:50 +01:00
Stéphane Nicoll e618f922c2 Resolve nested placeholders with a fallback having one
This commit fixes a regression in PlaceHolderParser where it would no
longer resolve nested placeholders for a case where the fallback has a
placeholder itself.

This is due to the Part implementations and how they are structure, and
this commit makes sure that nested resolution happens consistently.

Closes gh-34020
2024-12-05 16:59:30 +01:00
Juergen Hoeller 2b9010c2a2 Remove APIs marked as deprecated for removal
Closes gh-33809
2024-12-04 13:19:39 +01:00
Sam Brannen 5ac0b8e22e Remove obsolete code 2024-12-03 15:08:57 +01:00
Brian Clozel ba312f6c7c Update AOT support after RuntimeHints changes
This commit adapts AOT support in various modules after the RuntimeHints
and related deprecation changes.

`MemberCategory.INTROSPECT_*` hints are now removed and
`MemberCategory.*_FIELDS` are  replaced with
`MemberCategory.INVOKE*_FIELDS` when invocation is needed.

Usage of `RuntimeHintsAgent` are also deprecated.

Closes gh-33847
2024-11-29 14:44:05 +01:00
Brian Clozel 71362c953c Revisit RuntimeHints API
The `RuntimeHints` API mainly reflects what is needed to write GraalVM
reachability metadata. The latest GraalVM version simplified its
format. This commit applies relevant simplifications as parts of it are
not needed anymore.

The new metadata format implies methods, constructors and fields
introspection as soon as a reflection hint is registered for a type. As
a result, `ExecutableMode.INTROSPECT`, and all `MemberCategory` values
except `MemberCategory.INVOKE_*` are being deprecated.
They have no replacement, as registering a type hint is enough.
In practice, it is enough to replace this:

```
hints.reflection().registerType(MyType.class, MemberCategory.DECLARED_FIELDS);
```

By this:
```
hints.reflection().registerType(MyType.class);
```

As for `MemberCategory.PUBLIC_FIELDS` and `MemberCategory.DECLARED_FIELDS`,
values were replaced by `INVOKE_PUBLIC_FIELDS` and
`INVOKE_DECLARED_FIELDS` to make their original intent clearer and align
with the rest of the API. Note, if you were using those values for
reflection only, you can safely remove those hints in favor of a simple
type hint.

See gh-33847
2024-11-29 14:43:59 +01:00
Brian Clozel fec2ed5540 Implement new GraalVM reachability metadata format
As of GraalVM 23, a new and simplified reachability metadata format is
available. Metadata now consists of a single
"reachability-metadata.json" file that contains all the information
previously spread in multiple files. The new format does not include
some introspection flags, as they're now automatically included when a
hint is registered against a type.
Also, "typeReachable" has been renamed as "typeReached" to highlight the
fact that the event considered is the static initialization of the type,
not when the static analysis performed during native compilation is
reaching the type.

This new format ships with a JSON schema, which this commit is tested
against.

See gh-33847
2024-11-29 14:43:55 +01:00
Brian Clozel 989eb37fb7 Update AOT resource hints with new GraalVM behavior
Prior to this commit, the resource hints for AOT applications would
generate JSON metadata with `java.util.regex.Pattern`, like:

```
{
  "resources": {
    "includes": [
      {
        "pattern": "\\Qbanner.txt\\E"
      }
    ]
  }
}
```

This regexp feature, as well as "includes" and "excludes" are not supported
anymore with the new metadata format. This commit removes the pattern
format which is now replaced by a "glob" format.
"globs" should only contain "*" (zero or more characters in a path
segment)  or "**" (zero or more path segments).
Some instances of resource hint registration should be migrated as a
result.
For example, "/files/*.ext" matched both "/files/a.ext" and
"/files/folder/b.txt" in the past. The new behavior matches only the
former, unless the "/files/**/*.ext" glob pattern is used.

This commit also removes the "excludes" support, which was not widely
used and very often could lead to subtle behavior.

Closes gh-31340
2024-11-29 14:43:52 +01:00
Brian Clozel 5fa9460bf6 Temporarily revert changes for gh-33616
See gh-33616
2024-11-28 18:07:23 +01:00
Brian Clozel 5d492689b7 Create MetadataReaderFactory instances with factory methods
Prior to this commit, Spring would create directly
`SimpleMetadataReaderFactory` instances or would manually create
`CachingMetadataReaderFactory` which extend
`SimpleMetadataReaderFactory`. This would prevent usage of the new
`ClassFileMetadataReaderFactory` in our internal codebase.

This commit replaces manual instantiations with calls to
`MetadataReaderFactory` factory methods and makes
`CachingMetadataReaderFactory` delegate to another factory created with
the same factory methods.

This allows internal usage of `ClassFileMetadataReaderFactory`
internally.

Closes gh-33616
2024-11-28 16:30:16 +01:00
Brian Clozel 4f260a4511 Add ClassFile implementation for class metadata
Prior to this commit, Spring Framework would allow two ways of getting
class metadata:
* `StandardClassMetadata`, using the Java reflection API
* `SimpleMetadataReaderFactory`, using ASM to read the class bytecode

This commit adds a new implementation for this feature, this time using
the new `ClassFile` API which is taken out of preview in Java 24.

See gh-33616
2024-11-28 16:29:50 +01:00
Sébastien Deleuze ddec8d2653 Add missing `@Contract` annotation to ObjectUtils#isEmpty
Closes gh-33984
2024-11-28 15:17:02 +01:00
Sébastien Deleuze 1aede291bb Move Kotlin value class unboxing to InvocableHandlerMethod
Before this commit, in Spring Framework 6.2, Kotlin value class
unboxing was done at CoroutinesUtils level, which is a good fit
for InvocableHandlerMethod use case, but not for other ones like
AopUtils.

This commit moves such unboxing to InvocableHandlerMethod in
order to keep the HTTP response body support while fixing other
regressions.

Closes gh-33943
2024-11-27 16:39:26 +01:00
CHOICORE 41421d106b Fix log level in PathMatchingResourcePatternResolver
See gh-33956
2024-11-26 19:51:17 +01:00
Sam Brannen 7f7819329c Update copyright headers
See gh-33903
2024-11-17 15:14:16 +01:00
KNU-K 2494ecb47b Simplify utility implementations in spring-core
Closes gh-33903
2024-11-17 15:08:30 +01:00
Sam Brannen 6544698078 Polish contribution
See gh-33902
2024-11-17 11:45:37 +01:00
taehyun e0e96c487f Simplify implementation of FilteredIterator
Closes gh-33902
2024-11-17 11:41:22 +01:00
Juergen Hoeller 1c2dbec971 Merge branch '6.1.x' 2024-11-13 22:26:54 +01:00
Juergen Hoeller fec6ba4dfe Polishing 2024-11-13 22:26:06 +01:00
Juergen Hoeller 37b110a181 Polishing 2024-11-13 19:00:08 +01:00
Juergen Hoeller 25e2c1b7ce Merge branch '6.1.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
#	spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpConnector.java
2024-11-13 15:12:55 +01:00
Juergen Hoeller 01c85b1afb Add explicit note on blocking in case of concurrency limit
Closes gh-33873
2024-11-13 15:09:02 +01:00
Sébastien Deleuze 72e7f1552b Refine `@Contract` Javadoc
This commit refines `@Contract` Javadoc to mention
this and new return values.

Closes gh-33849
2024-11-06 12:03:19 +01:00
Sébastien Deleuze 7e1d6fe934 Merge branch '6.1.x' 2024-11-05 10:27:22 +01:00
Johnny Lim 0beb56a58c Fix indentation to use tabs in Kotlin source files
Closes gh-33840
2024-11-05 10:24:02 +01:00
Sam Brannen e3301dd1c4 Merge branch '6.1.x' 2024-11-03 16:17:43 +01:00
Sam Brannen 6bd4687706 Update copyright headers
See gh-33839
2024-11-03 16:14:41 +01:00
Tran Ngoc Nhan 07b12666b4 Fix typos in Javadoc and variable names
Closes gh-33839
2024-11-03 16:13:50 +01:00
Stéphane Nicoll 2b601f9e51 Merge branch '6.1.x' 2024-11-03 18:16:31 +09:00
Stéphane Nicoll d43126705f Polish "Add test coverage for DomUtils"
See gh-33768
2024-11-03 18:15:34 +09:00
kunaljani1100 57bbf0ca0f Add test coverage for DomUtils
See gh-33768
2024-11-03 13:44:07 +09:00
Juergen Hoeller 864cb25eec Upgrade to ASM 9.7.1
Closes gh-33821
2024-10-30 16:44:47 +01:00
Sébastien Deleuze 9166688b6f Remove the pure attribute from `@Contract`
Closes gh-33820
2024-10-30 15:11:44 +01:00
Sébastien Deleuze da8925131e Polish `@Contract` Javadoc 2024-10-30 15:11:28 +01:00
Sébastien Deleuze a005c325f7 Introduce `@CheckReturnValue` annotation
This commit introduces a `@CheckReturnValue` annotation,
inspired from org.jetbrains.annotations.CheckReturnValue,
that specifies that the method return value must be used.

See gh-33818
2024-10-30 14:45:35 +01:00
Sam Brannen f427ac383d (Re)suppress deprecation warnings
See gh-33780
2024-10-30 10:52:01 +01:00
Juergen Hoeller 9e3371ef07 Mark ListenableFuture as deprecated for removal
Closes gh-33808
2024-10-29 18:36:40 +01:00