Commit Graph

24109 Commits

Author SHA1 Message Date
Juergen Hoeller e26ea007fa Upgrade to spring-javaformat-checkstyle 0.0.42 and Netty 4.1.111 2024-06-12 14:09:08 +02:00
Stéphane Nicoll c10b6c2c3e Upgrade to Reactor 2020.0.45
Closes gh-33010
2024-06-11 14:02:14 +02:00
Juergen Hoeller 63568e6c4f Skip ajc-compiled aspects for ajc-compiled target classes
Includes defensive ignoring of incompatible aspect types.

Closes gh-32970

(cherry picked from commit 0ea96b4806)
2024-06-06 21:09:27 +02:00
Juergen Hoeller d41048528f Avoid NoSuchMethodException for annotation attribute checks
Closes gh-32921

(cherry picked from commit b08883b65c)
2024-06-03 12:56:36 +02:00
Sam Brannen 2384474615 Support compilation of map indexing with primitive in SpEL
Prior to this commit, the Spring Expression Language (SpEL) failed to
compile an expression that indexed into a Map using a primitive literal
(boolean, int, long, float, or double).

This commit adds support for compilation of such expressions by
ensuring that primitive literals are boxed into their corresponding
wrapper types in the compiled bytecode.

Closes gh-32903

(cherry picked from commit aed1d5f762)
2024-05-28 10:55:22 +02:00
Sam Brannen 0f04052ba1 Support compilation of array and list indexing with Integer in SpEL
Prior to this commit, the Spring Expression Language (SpEL) failed to
compile an expression that indexed into an array or list using an
Integer.

This commit adds support for compilation of such expressions by
ensuring that an Integer is unboxed into an int in the compiled
bytecode.

See gh-32694
Closes gh-32908

(cherry picked from commit 079d53c8d6)
2024-05-27 17:39:43 +02:00
Juergen Hoeller 98aa03c0c9 Test detection of original generic method for CGLIB bridge method
Includes isBridgedCandidateFor optimization (aligned with 6.0.x)

See gh-32888
2024-05-24 12:41:38 +02:00
Juergen Hoeller 3e45b76132 Polishing
(cherry picked from commit 6c08d93992)
2024-05-23 17:21:34 +02:00
Juergen Hoeller d42c9204ef Defensive handling of incompatible advice methods
This covers AspectJ transaction and caching aspects when encountered by Spring AOP.

Closes gh-32882
See gh-32793

(cherry picked from commit 6d7cd9c7dc)
2024-05-23 17:17:03 +02:00
Spring Builds d2babd46a2 Next development version (v5.3.37-SNAPSHOT) 2024-05-22 15:27:49 +00:00
Juergen Hoeller eff9f5b92a Select most specific advice method in case of override
Closes gh-32865

(cherry picked from commit ea596aa211)
2024-05-22 10:24:01 +02:00
Juergen Hoeller f1fed9c174 Polishing
(cherry picked from commit 20dea0dae2)
2024-05-21 18:18:30 +02:00
Juergen Hoeller d2e7cf4395 Default fallback parsing for UTC without milliseconds
Closes gh-32856

(cherry picked from commit fee17e11ba)
2024-05-21 18:07:31 +02:00
Juergen Hoeller 47a7abee8f Polishing 2024-05-21 12:28:48 +02:00
Juergen Hoeller ef2c140d3c Defensively catch and log pointcut parsing exceptions
Closes gh-32838
See gh-32793

(cherry picked from commit 617833bec9)
2024-05-17 12:50:50 +02:00
Spring Builds de6cf845b1 Next development version (v5.3.36-SNAPSHOT) 2024-05-16 07:09:30 +00:00
Juergen Hoeller 7da43a80e4 Upgrade to Reactor 2020.0.44 and Netty 4.1.109
Closes gh-32788
2024-05-14 22:54:32 +02:00
Juergen Hoeller 8323c87ea2 Polishing 2024-05-14 13:31:30 +02:00
Juergen Hoeller 0c65a5e04a Accept ajc-compiled @Aspect classes for Spring AOP proxy usage
AspectJExpressionPointcut leniently ignores unsupported expression.

Closes gh-32793
2024-05-14 13:14:09 +02:00
rstoyanchev ca9eb57c94 Update MockMvc section on Streaming in the docs
Closes gh-32687
2024-05-13 12:40:46 +01:00
Stéphane Nicoll df8374693b Adapt docs deployment properties
This commit fixes the artifact properties we set for "framework-docs"
artifacts. These have a different name as of 6.1.x and were backported
as is.

Closes gh-32781
2024-05-08 15:33:40 +02:00
Juergen Hoeller 9f35debdc6 Unwrap raw target Query instance in case of proxy mismatch
Closes gh-32766

(cherry picked from commit 59a125d06f)
2024-05-06 20:38:02 +02:00
Sam Brannen 8fe545edcd Fix compilation error in test 2024-05-03 12:37:42 +03:00
Sam Brannen f5baa329f7 Include repeatable annotation container in MergedAnnotations results
A bug has existed in Spring's MergedAnnotations support since it was
introduced in Spring Framework 5.2. Specifically, if the
MergedAnnotations API is used to search for annotations with "standard
repeatable annotation" support enabled (which is the default), it's
possible to search for a repeatable annotation but not for the
repeatable annotation's container annotation.

The reason is that MergedAnnotationFinder.process(Object, int, Object,
Annotation) does not process the container annotation and instead only
processes the "contained" annotations, which prevents a container
annotation from being included in search results.

In #29685, we fixed a bug that prevented the MergedAnnotations support
from recognizing an annotation as a container if the container
annotation declares attributes other than the required `value`
attribute. As a consequence of that bug fix, since Spring Framework
5.3.25, the MergedAnnotations infrastructure considers such an
annotation a container, and due to the aforementioned bug the container
is no longer processed, which results in a regression in behavior for
annotation searches for such a container annotation.

This commit addresses the original bug as well as the regression by
processing container annotations in addition to the contained
repeatable annotations.

See gh-29685
Closes gh-32731

(cherry picked from commit 4baad16437)
2024-05-03 12:21:32 +03:00
Juergen Hoeller 924b684345 Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747

(cherry picked from commit 25cedcfb99)
2024-05-01 18:15:20 +02:00
Juergen Hoeller a48e2f31a3 Polishing 2024-05-01 16:07:04 +02:00
Juergen Hoeller 1833aafc3f Ignore non-String keys in PropertiesPropertySource.getPropertyNames()
Closes gh-32742

(cherry picked from commit 610626aec6)
2024-05-01 16:04:42 +02:00
Brian Clozel b8bc780365 Fix build warnings
See gh-32725
2024-04-30 19:09:03 +02:00
Arjen Poutsma b3724ebf84 Fix guard against multiple subscriptions
This commit changes the guard against multiple subscriptions, as the
previously used doOnSubscribe hook could not function as guard in
certain scenarios.

See gh-32727
Closes gh-32728
2024-04-30 16:20:54 +02:00
Brian Clozel 2e74a4d878 Upgrade to gradle-enterprise-conventions 0.0.17
Closes gh-32725
2024-04-29 13:24:11 +02:00
Juergen Hoeller 0c307b513e Polishing 2024-04-23 16:41:52 +02:00
Juergen Hoeller 6b6beec4ee Skip close lock if acquired by other thread already
Closes gh-32445

(cherry picked from commit d151931f86)
2024-04-23 16:26:26 +02:00
Juergen Hoeller 520a1130b8 Polishing (aligned with 6.1.x) 2024-04-18 13:15:49 +02:00
yhao3 ceeb55291a Update links to HttpOnly documentation at OWASP in ResponseCookie
See gh-32663
Closes gh-32668

(cherry picked from commit 7f27ba3902)
2024-04-18 12:01:30 +02:00
Spring Builds cbc2ab6ab9 Next development version (v5.3.35-SNAPSHOT) 2024-04-11 07:16:36 +00:00
Brian Clozel 7678286fb3 Refine UriComponentsBuilder parsing
This commit refines the expressions for the scheme, user info, host and
port parts of the URL in UriComponentsBuilder to better conform to
RFC 3986.

Fixes gh-32618
2024-04-11 08:50:46 +02:00
Stéphane Nicoll 510ff87721 Upgrade to Reactor 2020.0.43
Closes gh-32594
2024-04-09 19:57:06 +02:00
Sam Brannen 7609727433 Detect bridge methods across ApplicationContexts in MethodIntrospector
Prior to this commit, MethodIntrospector failed to properly detect
bridge methods for subsequent invocations of selectMethods() with the
same targetType and MetadataLookup, if such subsequent invocations
occurred after the ApplicationContext had been refreshed.

The reason this occurs is due to the following.

- Class#getDeclaredMethods() always returns "child copies" of the
  underlying Method instances -- which means that `equals()` should be
  used instead of `==` whenever the compared Method instances can come
  from different sources (such as the static caches mentioned below).

- BridgeMethodResolver caches resolved bridge methods in a static cache
  -- which is never cleared.

- ReflectionUtils caches declared methods in a static cache
  -- which gets cleared when an ApplicationContext is refreshed.

Consequently, if you attempt to load an ApplicationContext twice in the
same ClassLoader, the second attempt uses the existing, populated cache
for bridged methods but a cleared, empty cache for declared methods.
This results in new invocations of Class#getDeclaredMethods(), and
identity checks with `==` then fail to detect equivalent bridge methods.

This commit addresses this by additionally comparing bridge methods
using `equals()` in MethodIntrospector.selectMethods().

Note that the `==` checks remain in place as an optimization for when
`equals()` is unnecessary.

Closes gh-32586

(cherry picked from commit e702733c7b)
2024-04-09 19:14:32 +02:00
Juergen Hoeller a0ae96da69 Upgrade to Netty 4.1.108 2024-04-09 17:02:52 +02:00
Juergen Hoeller 1d2daa5d6e Log column type for limited support message in getResultSetValue
Closes gh-32601

(cherry picked from commit c5590ae9e6)
2024-04-09 16:23:19 +02:00
Stéphane Nicoll 239594595c Upgrade actions that use deprecated features 2024-03-20 10:38:57 +01:00
Juergen Hoeller 76c0017180 Polishing 2024-03-18 16:34:06 +01:00
Juergen Hoeller 0628b479f1 Propagate JMS IllegalStateException from commit/rollbackIfNecessary
Closes gh-32473

(cherry picked from commit cd7ba1835c)
2024-03-18 16:25:33 +01:00
Sam Brannen f6205d4207 Avoid unnecessary Annotation array cloning in TypeDescriptor
Closes gh-32476

(cherry picked from commit 42a4f28962)
2024-03-18 15:19:40 +01:00
Juergen Hoeller d21100fea0 Restore original toString representation (revert accidental backport)
See gh-32405
2024-03-17 20:46:59 +01:00
Juergen Hoeller f7f1028428 Remove superfluous @NonNull declarations 2024-03-16 14:39:58 +01:00
Juergen Hoeller 1cb0c7c036 Avoid cloning empty Annotation array in TypeDescriptor (backport)
Closes gh-32405
2024-03-16 14:31:24 +01:00
Juergen Hoeller 51d70dcf34 Polishing 2024-03-15 21:30:07 +01:00
Juergen Hoeller 61f7087911 Consistently apply TaskDecorator to ManagedExecutorService as well
Closes gh-32455
2024-03-15 21:23:43 +01:00
Stéphane Nicoll 2ff8a00e9a Enable backport bot on 5.3.x
Closes gh-32451
2024-03-15 11:19:11 +01:00