Commit Graph

29448 Commits

Author SHA1 Message Date
Juergen Hoeller
39cd31613b Polishing 2024-04-10 18:06:32 +02:00
Sébastien Deleuze
ca2b3c170c Add Kotlin hints for enclosing class
This is needed by Kotlin reflection in order to be able to list
class members on native.

Closes gh-32472
2024-04-10 17:53:12 +02:00
Brian Clozel
019ce4418c BufferingClientHttpRequestWrapper should not write empty body
Prior to this commit, `BufferingClientHttpRequestWrapper` would always
write to the actual client request body, even if the buffered content
was empty (empty byte array).
This would cause issues with specific client request factories,
especially the OkHttp variant, that would consider empty byte arrays as
non-empty body and would reject such cases for GET requests with an
"IllegalArgumentException: method GET must not have a request body".

This commit only writes to the request if the buffered content is not
empty.

Fixes gh-32612
2024-04-10 16:41:16 +02:00
Stéphane Nicoll
a0136a276a Upgrade to Reactor 2023.0.5
Closes gh-32592
2024-04-09 19:51:08 +02:00
rstoyanchev
8d05028c2e RequestParam resolver supports empty array suffix
Closes gh-32577
2024-04-09 18:24:57 +01:00
rstoyanchev
4a68c44a27 Update content-length when reconstructing body
Closes gh-32471
2024-04-09 18:24:57 +01:00
Sam Brannen
e702733c7b 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
2024-04-09 18:56:41 +02:00
Sam Brannen
187f641409 Polishing 2024-04-09 18:55:39 +02:00
Brian Clozel
ac74116d76 Instrument JmsTemplate#sendAndReceive
Prior to this commit, the `JmsTemplate#sendAndReceive` method would not
instrument the JMS session. This means that no metric would be recorded
when sending the message and no trace would be propagated downstream.

This commit ensures that the JMS session is instrumented in this case as
well. Note, the reception of the response message does not create a
`"jms.message.process"` observation as the session is only receiving the
message, no listener has been configured on the message consumer.

Fixes gh-32606
2024-04-09 18:34:09 +02:00
Juergen Hoeller
c5590ae9e6 Log column type for limited support message in getResultSetValue
Closes gh-32601
2024-04-09 16:14:45 +02:00
Juergen Hoeller
39b551c334 Document hand-off to execution thread (including ScheduledFuture impact)
Closes gh-32589
2024-04-09 16:14:38 +02:00
Sébastien Deleuze
23696b7db8 Add a classpath check for AOP Coroutines/Reactive conversion
Closes gh-32599
2024-04-09 15:21:21 +02:00
Stéphane Nicoll
7b7cfb27a3 Upgrade to Micrometer 1.12.5
Closes gh-32596
2024-04-09 12:59:46 +02:00
Juergen Hoeller
f2889b1b43 Consistent support for generic FactoryBean type matching
Closes gh-32590
See gh-32489
2024-04-08 22:39:29 +02:00
Stéphane Nicoll
802967fc98 Add reproducer
See gh-32489
2024-04-08 11:09:56 +02:00
Juergen Hoeller
22328905da Do not extract FactoryBean generic in case of targetType mismatch
Closes gh-32489
2024-04-08 09:51:59 +02:00
Juergen Hoeller
67a81004a2 Upgrade to AspectJ 1.9.22, Groovy 4.0.20, Tomcat 10.1.20, Netty 4.1.108, OpenPDF 1.3.43, Woodstox 6.6.2, Checkstyle 10.15 2024-04-05 18:04:58 +02:00
Juergen Hoeller
84963ba4d8 Polishing 2024-04-05 18:04:08 +02:00
Juergen Hoeller
07472758ee Detect Undertow RequestTooBigException message in handleParseFailure
Closes gh-32549
2024-04-05 18:03:44 +02:00
Arjen Poutsma
47c9c7eb07 Update copyright
See gh-32528
2024-04-05 16:13:39 +02:00
Stéphane Nicoll
8568aa691c Stop linking to Websphere's Javadoc
Closes gh-32581
2024-04-05 15:57:58 +02:00
Arjen Poutsma
b24221754a ReactorNettyClientResponse should close response body
This commit ensures that the response body is drained and closed when
the response itself is closed, instead of disposing the connection, as
this will disable the connection pool.

Closes gh-32528
2024-04-05 15:38:18 +02:00
Sébastien Deleuze
7a666cfd86 Revert some null-safety changes
This commit reverts some null-safety changes which make sense
on main but are too impactful for 6.1.x for Kotlin developers
using -Xjsr305=strict.

See gh-32475
2024-04-05 14:59:39 +02:00
Sébastien Deleuze
4a7c24d90f Refine null-safety
See gh-32475
2024-04-05 14:30:50 +02:00
Stéphane Nicoll
d955549037 Clarify scope of exception
See gh-29491
2024-04-04 14:42:41 +02:00
Stéphane Nicoll
b68f76c86e Polish
See gh-32502
2024-04-04 14:42:41 +02:00
Simon Baslé
521cda009b Use non-blocking thread in WebFlux controller with RequestBody parameter
This commit ensures that `InvocableHandlerMethod` executes the method
on the desired thread if a non-blocking thread is specified, even in the
case where arguments resolution happens on a different thread. This is
notably the case if the method body is resolved as an input argument to
the controller method (`@RequestBody`).

Closes gh-32502
2024-04-04 14:20:16 +02:00
Stéphane Nicoll
08c9b5c96c Upgrade to Gradle 8.7
Closes gh-32566
2024-04-02 18:01:37 +02:00
Stéphane Nicoll
a942a6e172 Document behavior of profiles enabled for AOT optimizations
Closes gh-32543
2024-04-02 15:47:43 +02:00
Stéphane Nicoll
9b1d5ea6e0 Merge pull request #32557 from Banuelorigni
* pr/32557:
  Polish reference guide

Closes gh-32557
2024-04-02 09:33:00 +02:00
kexin.an
640b97f33c Polish reference guide
See gh-32557
2024-04-02 09:29:55 +02:00
Stéphane Nicoll
1fb99e4192 Merge pull request #32560 from quaff
* pr/32560:
  Polish javadoc of AnnotatedBeanDefinitionReader

Closes gh-32560
2024-04-01 12:14:51 +02:00
Yanming Zhou
23d89362b0 Polish javadoc of AnnotatedBeanDefinitionReader
See gh-32560
2024-04-01 12:12:02 +02:00
Sébastien Deleuze
048e4f0aa2 Invoke KCallablesJvm.setAccessible only when required
Closes-32536
2024-03-28 11:12:50 +01:00
T45K
b28153e1d7 Fix handling of value class with private constructor
See gh-32536
2024-03-28 11:11:58 +01:00
Sébastien Deleuze
88b9c0567d Refine null-safety in spring-test
See gh-32475
2024-03-26 18:09:55 +01:00
Stéphane Nicoll
c7c9da56da Consistent atMost period for Awaitility-based tests
Closes gh-32537
2024-03-26 17:45:14 +01:00
Sébastien Deleuze
290a41d398 Refine null-safety in more modules
This commit refines the null-safety in all remaining modules
except spring-test.

See gh-32475
2024-03-26 15:39:18 +01:00
Sébastien Deleuze
1b563f8ba4 Refine null-safety in more modules
This commit refines the null-safety in:
 - spring-jdbc
 - spring-r2dbc
 - spring-orm
 - spring-beans
 - spring-aop

See gh-32475
2024-03-26 09:46:34 +01:00
Sébastien Deleuze
dea31dd55e Refine null-safety in spring-messaging
See gh-32475
2024-03-25 12:24:53 +01:00
Sébastien Deleuze
06b91c4ea5 Refine null-safety in spring-jms
See gh-32475
2024-03-25 11:28:00 +01:00
Sébastien Deleuze
a63ebe7e9d Refine null-safety in spring-web and spring-websocket
See gh-32475
2024-03-25 11:02:44 +01:00
Stéphane Nicoll
c4b615052e Merge pull request #32517 from izeye
* pr/32517:
  Add Javadoc since to KotlinSerializationStringEncoder.setStreamingMediaTypes()

Closes gh-32517
2024-03-24 09:23:05 +01:00
Johnny Lim
dca5f1dcd8 Add Javadoc since to KotlinSerializationStringEncoder.setStreamingMediaTypes()
See gh-32517
2024-03-24 09:21:36 +01:00
Sébastien Deleuze
a16e8c34b2 Refine null-safety in spring-webmvc
See gh-32475
2024-03-22 17:44:35 +01:00
Sam Brannen
52b8c71dcd Retain null-safe syntax in AST representation of selection & projection
Prior to this commit, SpEL's CompoundExpression omitted the null-safe
syntax in AST string representations of the selection and projection
operators.

To address this, this commit implements isNullSafe() in Projection and
Selection.

Closes gh-32515
2024-03-22 17:05:48 +01:00
Sam Brannen
f941754db6 Introduce isNullSafe() in SpelNodeImpl
Prior to this commit, MethodReference and PropertyOrFieldReference
already defined local isNullSafe() methods, but we need identical
methods in Selection, Projection, and Indexer, and we may potentially
need null-safe support for additional operators in the future.

To address the common need for an is-null-safe check, this commit
introduces an isNullSafe() method in SpelNodeImpl with a default
implementation that returns false.

Closes gh-32516
2024-03-22 16:37:08 +01:00
Sam Brannen
d4495a5654 Revise PropertyOrFieldReference since isNullSafe() is not final 2024-03-22 16:37:08 +01:00
Stéphane Nicoll
c7c61e13e1 Merge pull request #32514 from izeye
* pr/32514:
  Apply UnnecessarySemicolonInEnumeration Checkstyle module

Closes gh-32514
2024-03-22 16:31:54 +01:00
Johnny Lim
4d722414da Apply UnnecessarySemicolonInEnumeration Checkstyle module
This commit also fixes its violation.

See gh-32514
2024-03-22 16:30:06 +01:00