Commit Graph

29906 Commits

Author SHA1 Message Date
Juergen Hoeller 94d46eba3c Exclusively mention CompletableFuture instead of ListenableFuture
Closes gh-33805
2024-10-28 22:05:10 +01:00
Sam Brannen e340e45f5a Rename aopAvailable constants in TransactionSynchronizationUtils
Closes gh-33796
2024-10-25 14:41:41 +02:00
Brian Clozel a06bbccf9e HttpHeaders.writeableHttpHeaders should unwrap many times
Prior to this commit, the `HttpHeaders.writeableHttpHeaders` would only
consider headers read-only instances that were wrapped once by
`HttpHeaders.readOnlyHttpHeaders`. This does not work when other
`HttpHeaders` wrappers are involved in the chain.

This commit ensures that `writeableHttpHeaders` unwraps all headers
instances down to the actual multivalue map and create a new headers
instance out of it.

Fixes gh-33789
2024-10-25 10:22:12 +02:00
rstoyanchev bbe362c0e6 Allow null from RestClient exchange methods
Closes gh-33779
2024-10-23 19:08:54 +01:00
Brian Clozel 4a81f2c904 Remove HTTP parts workaround for Resin
A workaround was added for the Resin Servlet container in gh-13937.
This avoids attempting to delete parts that are not named, because the
`part.delete()` call would fail for non-file entries. This can be
problematic for files that are unnamed as they might not be removed by
the Framework.

This commit removes this workaround as Resin is not supported anymore.

Fixes gh-33511
2024-10-23 09:24:30 +02:00
Sam Brannen fb0a108254 Improve Javadoc for core SpEL APIs 2024-10-22 13:04:29 +02:00
Sam Brannen c98f314665 Throw ParseException for unsupported character in SpEL expression
Prior to this commit, the SpEL Tokenizer threw an IllegalStateException
when an unsupported character was detected in a SpEL expression;
however, the Javadoc for ExpressionParser.parseExpression() states that
it throws a ParseException if an exception occurred during parsing.

This commit addresses that issue by throwing a SpelParseException for
an unsupported character in a SpEL expression, using a new
UNSUPPORTED_CHARACTER enum constant in SpelMessage.

Closes gh-33767
2024-10-22 13:03:08 +02:00
Sehwan Lim d22924c728 Fix incorrect regex rendering in MVC controller documentation
This commit fixes the issue where the regex pattern in the reference documentation
was not rendering correctly for the `/projects/{project:[a-z]+}/versions` mapping.

Closes gh-33766
2024-10-21 18:32:44 +02:00
Juergen Hoeller e235e661d8 Polishing 2024-10-21 18:13:42 +02:00
Juergen Hoeller 09fe0adb40 Load-time weaving support for WildFly 24+
Closes gh-33728
2024-10-21 18:13:34 +02:00
Brian Clozel 84e762b470 Fix double accounting of JMS process observations
Prior to this commit, the instrumentation of the processing of JMS
messages would happen a different levels of the hierarchy, accounting
for alli known implementations, `SimpleMessageListenerContainer` and
`DefaultMessageListenerContainer` as well as various use cases and
`MessageListener` variants.

Unfortunately, this instrumentation could lead to observing JMS
processing twice in some cases, and would not be consistent about the
scope of what's observed.

This commit moves the instrumentation basics into the
`AbstractMessageListenerContainer` but leaves the actual observation
calls to the public implementations.

Fixes gh-33758
2024-10-21 16:09:58 +02:00
Juergen Hoeller e90a2da05d Clarify defensive impact of allowEagerInit flag for type matching
Closes gh-33740
2024-10-21 15:38:25 +02:00
Sam Brannen d48f388c6a Polish Javadoc for @⁠DateTimeFormat 2024-10-21 12:19:35 +02:00
Sam Brannen bbbb7c396e Update Date/Time formatting tests for pre/post JDK 20
This commit updates our Date/Time formatting/printing tests to
demonstrate that the use of fallback patterns can help mitigate
locale-based parsing/formatting issues beginning with JDK 20.

The documentation within the tests is intentionally rather thorough for
two reasons:

1. We need to understand exactly what it is we are testing and why the
   tests are written that way.

2. We may re-use parts of the documentation and examples in forthcoming
   documentation that we will provide to users.

See gh-33151
2024-10-20 17:35:37 +02:00
Sam Brannen d72c8b32b7 Ignore duplicate @⁠Priority values when determining highest priority
Prior to this commit, DefaultListableBeanFactory's
determineHighestPriorityCandidate() method sometimes failed to
determine the highest priority candidate if duplicate priority
candidates were detected whose priority was not the highest priority in
the candidate set. In addition, the bean registration order affected
the outcome of the algorithm: if the highest priority was detected
before other duplicate priorities were detected, the algorithm
succeeded in determining the highest priority candidate.

This commit addresses those shortcomings by ignoring duplicate
@⁠Priority values unless the duplication is for the highest priority
encountered, in which case a NoUniqueBeanDefinitionException is still
thrown to signal that multiple beans were found with the same "highest
priority".

Closes gh-33733
2024-10-19 14:54:29 +02:00
Brian Clozel 67d78eb61c Avoid Servlet observations failures for invalid HTTP status
Prior to this commit, the `DefaultServerRequestObservationConvention`
for Servlet failed when the HTTP response status was invalid (for
example, set to "0").

This commit catches `IllegalArgumentException` thrown for such invalid
HTTP status and instead returns an unknown outcome for the observation.

Fixes gh-33725
2024-10-18 14:43:46 +02:00
Johnny Lim 73fd9133e9 Fix Javadoc in ReactorNetty2ResourceFactory
See gh-33338
Closes gh-33735
2024-10-18 12:36:15 +02:00
Sébastien Deleuze 5e28a25a30 Add a WebFlux integration test
This commit adds a WebFlux integration test with a request
body and a delayed response in order to test a use case
where we found a regression with Undertow 2.3.18.Final.

For now, Undertow 2.3.17.Final is still used.

Closes gh-33739
2024-10-18 11:13:09 +02:00
Sébastien Deleuze 4c44b91cf9 Speedup WebFlux tests by reducing the interval period
In WebFlux, we have various tests using a period of 50 or 100ms.
We should use a smaller value like 1ms to speedup tests.

Closes gh-33738
2024-10-18 11:12:08 +02:00
Brian Clozel 912c067e23 Fix buffer leak in Jackson2 decoders
Prior to this commit, the Jackson2 decoders (JSON, Smile, CBOR) could
leak buffers in case the decoding operation times out or is cancelled
and some buffers are still in flight.

This commit ensures that buffers are released on cancel signals.

Fixes gh-33731
2024-10-18 10:51:38 +02:00
Stéphane Nicoll a55701588e Next development version (v6.1.15-SNAPSHOT) 2024-10-17 10:28:22 +02:00
Juergen Hoeller fde7116ae4 Consistently skip processing of plain Java annotations
Closes gh-33580
2024-10-16 17:17:22 +02:00
Brian Clozel 0a645916cd Add checkstyle rule for toLowerCase/toUpperCase
This commit adds a checkstyle rule that prevents the re-introduction of
such calls.

See gh-33708
2024-10-16 16:25:03 +02:00
Habin Song 5302e7aa25 Update fallback.adoc
Fix a typo.

Closes gh-33721
2024-10-16 14:20:56 +02:00
github-actions[bot] cad02c1743 Update Antora Spring UI to v0.4.17 2024-10-16 14:15:55 +02:00
Juergen Hoeller c765d03a59 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:44:59 +02:00
Juergen Hoeller 11d4272ff4 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:36:23 +02:00
rstoyanchev 23656aebc6 Use Locale.ROOT consistently for toLower/toUpperCase
See gh-33708
2024-10-16 12:05:54 +01:00
Juergen Hoeller feb6a5f52d Polishing 2024-10-16 11:35:23 +02:00
Stéphane Nicoll a228eb8bd6 Upgrade to Reactor 2023.0.11
Closes gh-33637
2024-10-15 14:56:57 +02:00
Stéphane Nicoll c015814140 Upgrade to Micrometer 1.12.11
Closes gh-33647
2024-10-15 09:06:27 +02:00
rstoyanchev fb7890d739 Update processPath for double encoding
See gh-33689
2024-10-14 18:13:55 +01:00
Habin Song 7c2c4d7c9a Update scheduling.adoc
Change 'OutOfMemoryErrors' to 'OutOfMemoryError'.

Closes gh-33703
2024-10-14 19:01:33 +02:00
rstoyanchev 3bfbe30a78 Normalize static resource path early
Rather than leaving it to the Resource implementation, and
potentially normalizing twice, we apply it once as part of the
initial processPath checks.

Closes gh-33689
2024-10-14 15:52:15 +01:00
Brian Clozel 32962894a0 Add runtime hints for JMS connection factories proxies
Prior to this commit, the JMS connection factories would proxy various
interfaces. This typically requires runtime hints for GraalVM native
applications and spring-jms is missing those.

This commit adds a new `ConnectionFactoriesRuntimeHints` that
contributes such hints with type conditions.

Fixes gh-33590
2024-10-14 14:54:24 +02:00
Hosam Aly 97bce6d361 Fix link in testing/support-jdbc.adoc
Fix the link to "Testing Data Access Logic with an Embedded Database".

Closes gh-33686
2024-10-14 12:07:17 +02:00
Simon Baslé 8da31e1db7 Reject CORS request with 403 if Origin header is malformed
When assessing if a request is a CORS request, both mvc and reactive
`DefaultCorsProcessor` now catch `IllegalArgumentException` and turn
this into a 403 rejection rather than letting the exception propagate
into a 500 response.

Closes gh-33688
2024-10-14 11:50:19 +02:00
Stéphane Nicoll f991c19b30 Merge pull request #33617 from asibross
* pr/33617:
  Polish "Adapt Javadoc note about log level of BeanPostProcessorChecker"
  Adapt Javadoc note about log level of BeanPostProcessorChecker

Closes gh-33617
2024-10-09 14:44:32 +02:00
Stéphane Nicoll 3c80d4c978 Polish "Adapt Javadoc note about log level of BeanPostProcessorChecker"
See gh-33617
2024-10-09 14:42:36 +02:00
Asi Bross 6da32b4631 Adapt Javadoc note about log level of BeanPostProcessorChecker
See gh-33617
2024-10-09 14:40:49 +02:00
Stéphane Nicoll 91cadf7f24 Start building against Reactor 2023.0.11 snapshots
See gh-33637
2024-10-09 14:16:14 +02:00
Stéphane Nicoll 90637b6344 Start building against Micrometer 1.12.11 snapshots
See gh-33647
2024-10-09 14:15:22 +02:00
Juergen Hoeller 2622db1dbe Consistent references to annotation-based autowiring 2024-10-08 11:26:42 +02:00
Juergen Hoeller 3dac274d20 Avoid synchronization for delegate initialization
Closes gh-33656
2024-10-07 10:19:16 +02:00
Stéphane Nicoll 6b975592bf Harmonize GitHub Actions structure
See https://github.com/spring-projects/spring-boot/issues/42512
2024-10-07 07:57:16 +02:00
Sam Brannen c44e43d791 Upgrade to JUnit 5.10.5 2024-10-04 15:33:25 +02:00
Stéphane Nicoll c41f8ea3c8 Merge pull request #33634 from junhyeongkim2
* pr/33634:
  Use HttpMethod.GET for better readability

Closes gh-33634
2024-10-04 10:20:20 +02:00
jun a668580f77 Use HttpMethod.GET for better readability
See gh-33634
2024-10-04 10:10:58 +02:00
Simon Baslé b54420f8aa Include argument name in MethodArgumentTypeMismatchException message
Closes gh-33573
2024-10-03 16:32:29 +02:00
Sam Brannen 0b3b1391c1 Avoid usage of deprecated AssertJ feature 2024-09-30 12:41:35 +02:00