Commit Graph

28484 Commits

Author SHA1 Message Date
Sam Brannen a33791e2b8 Fix typo 2023-10-24 16:44:58 +02:00
Juergen Hoeller 795ce1658c Consistent Class and array matching with Class comparison shortcut
Closes gh-31487
2023-10-24 16:42:52 +02:00
Arjen Poutsma b6e0b8c343 Use StreamingHttpOutputMessage.Body.repeatable in OkHttp3ClientHttpRequest
See gh-31449
2023-10-24 16:12:26 +02:00
Stéphane Nicoll 322013a30a Clarify the semantic of lite mode
This commit removes the "plain old class" bit of the documentation as
it may be confusing. The gist of it is that it must be a bean but not
annotated with `@Configuration` so the updated sentence states exactly
that.

Closes gh-29957
2023-10-24 16:00:48 +02:00
Sam Brannen 54839a7126 Test quoted identifiers in schema in SimpleJdbcInsert
This commit introduces additional tests for "quoted identifier" support
in SimpleJdbcInsert when the schema itself is defined using quoted
identifiers -- for example, to use keywords as column names.

See gh-31208
2023-10-24 14:36:10 +02:00
rstoyanchev 2864c12887 Merge branch '6.0.x' 2023-10-24 12:58:31 +01:00
rstoyanchev 4dab35205d Avoid super.doTrace for ERROR dispatches
Closes gh-31457
2023-10-24 12:58:11 +01:00
rstoyanchev 3f8bbdb116 Merge branch '6.0.x' 2023-10-24 12:53:55 +01:00
rstoyanchev 5c6b9be3a1 Send 400 for PathVariable that is null after conversion
This implies a value was actually sent, but is not something
that can be converted to the expected type.

Closes gh-31382
2023-10-24 12:53:25 +01:00
Stéphane Nicoll 999b5d4462 Better error reporting when instance does not match factory method
This commit improves the handling of IllegalArgumentException in
SimpleInstantiationStrategy. Previously, only arguments mismatch were
handled but the exception can also be thrown if the factory instance
does not match the target method.

Closes gh-28897
2023-10-24 13:29:12 +02:00
Stéphane Nicoll 6299a9dfc9 Add tests for SimpleInstantiationStrategy 2023-10-24 13:29:12 +02:00
rstoyanchev 796080abb8 Test for change to add conversion of defaultValue
This commit adds a test and polishing for a change in
AbstractNamedValueMethodArgumentResolver erroneously committed
with (unrelated) commit e57b942b.

If an argument becomes null after conversion and a default value is
applied, that default value should also pass through conversion.

Closes gh-31336
2023-10-24 12:24:03 +01:00
Arjen Poutsma e0ac000415 Allow repeatable writes in StreamingHttpOutputMessage
This commit adds a repeatable property to
StreamingHttpOutputMessage.Body, indicating that the body can be written
 multiple times. In HttpComponentsClientHttpRequest, this property is
 exposed via org.apache.hc.core5.http.HttpEntity.isRepeatable, to allow
 for redirects.

Closes gh-31449
2023-10-24 12:11:13 +02:00
Sam Brannen 71330ddb0f Revise support for quoted identifiers in SimpleJdbcInsert
Closes gh-31208
2023-10-24 11:52:51 +02:00
Sam Brannen a803206d5f Polishing 2023-10-24 11:52:51 +02:00
rstoyanchev e57b942b4d MockMvcBuilder supports filter name in addition to initParams
Closes gh-31474
2023-10-24 10:33:58 +01:00
Stéphane Nicoll ef47eef92a Merge branch '6.0.x' 2023-10-24 10:57:09 +02:00
Stéphane Nicoll 33fba8ea0c Merge pull request #31483 from bernie-schelberg-invicara
* pr/31483:
  Polish "Return consistent collection type for matrix variables"
  Return consistent collection type for matrix variables

Closes gh-31483
2023-10-24 10:56:36 +02:00
Stéphane Nicoll 9aa707ec4b Polish "Return consistent collection type for matrix variables"
See gh-31483
2023-10-24 10:55:42 +02:00
Bernie Schelberg ea30c8fb5b Return consistent collection type for matrix variables
See gh-31483
2023-10-24 10:27:47 +02:00
Juergen Hoeller 8712fdcd3b Polishing 2023-10-23 17:36:06 +02:00
Juergen Hoeller cf3a25bfac Merge branch '6.0.x' 2023-10-23 17:34:45 +02:00
Juergen Hoeller 6bdf7ad36a Polishing 2023-10-23 17:32:45 +02:00
Juergen Hoeller d2108d2db6 Test for @Resource @Lazy fallback type match
See gh-31447
2023-10-23 17:32:35 +02:00
Juergen Hoeller f9be717602 Avoid getObjectType exception for uninitialized ProxyFactoryBean
Closes gh-31473
2023-10-23 17:32:25 +02:00
Juergen Hoeller 8457c768e8 Polishing 2023-10-23 16:56:40 +02:00
Juergen Hoeller 6dc79b5105 Declare empty default postProcessBeanFactory method
Closes gh-31476
2023-10-23 16:56:05 +02:00
Arjen Poutsma cb4d44b83e JdkClientHttpRequest does not support Content-Length 0
This commit ensures the correct HttpRequest.BodyPublisher is used with
Content-Length 0.

Closes gh-31451
2023-10-23 12:25:10 +02:00
Stéphane Nicoll 3cb700c103 Merge branch '6.0.x' 2023-10-23 11:34:12 +02:00
Stéphane Nicoll bb446a3905 Merge pull request #31433 from martin-lukas
* pr/31433:
  Polish "Ignore @Value on record property"
  Ignore @Value on record property

Closes gh-31433
2023-10-23 11:33:57 +02:00
Stéphane Nicoll f3dce4bb9a Polish "Ignore @Value on record property"
See gh-31433
2023-10-23 11:20:49 +02:00
Martin Lukas 70cb96c1d8 Ignore @Value on record property
See gh-31433
2023-10-23 11:15:24 +02:00
Sam Brannen 2d792f000a Polish "Apply SingleSpaceSeparator Checkstyle module"
See gh-31469
2023-10-22 14:18:18 +02:00
Johnny Lim 64e9fcad53 Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations.

Closes gh-31469
2023-10-22 14:09:57 +02:00
Sam Brannen 8a05661707 Polishing 2023-10-22 13:35:49 +02:00
Sam Brannen f72bf0c177 Revert "Skipping duplicate test classes during test AOT processing"
This reverts commit 1281f03b96.
2023-10-22 13:35:49 +02:00
Sam Brannen 563112c1b7 Ensure integration tests pass in AOT mode
See gh-29122
2023-10-22 13:35:49 +02:00
Sam Brannen 37e6fe5b64 Update copyright headers 2023-10-22 11:28:40 +02:00
Stéphane Nicoll cf10cee16a Polish 2023-10-21 17:48:27 +02:00
Brian Clozel dab7e03c93 Polish
See gh-28041
2023-10-20 18:34:52 +02:00
Chen Jianbin 4bf995fa8b Support "*" mapping in MockMvc filter registration
Prior to this commit, configuring a Servlet filter in MockMvc with a
defined mapping would only consider "/*" as a catch-all pattern.

This commit relaxes this rule by also accepting "*" mappings.

Closes gh-28041
2023-10-20 18:32:06 +02:00
Brian Clozel 31a62ff8ba Add JMH benchmarks for Protobuf message converter
This commit re-generates the protobuf Java classes with a recent version
of the protoc binary and adds JMH benchmarks that exercise the message
converter for both the reading and writing cases.

See gh-29496
2023-10-20 16:35:21 +02:00
Brian Clozel 631a5d1dc1 Remove support for Protobuf 2.x and protobuf-java-format
Closes gh-31465
2023-10-20 15:05:02 +02:00
rstoyanchev 7271dfed68 Use CopyOnWriteArrayList for beforeCommit actions
Closes gh-27587
2023-10-20 13:21:09 +01:00
rstoyanchev a2f2f7c348 Use correct RequestParam resolver
Closes gh-31329
2023-10-20 12:39:50 +01:00
Sébastien Deleuze c1437f9817 Refine CRaC restoration logs
Closes gh-31462
2023-10-20 11:40:44 +02:00
Brian Clozel daaccce918 Merge branch '6.0.x' 2023-10-19 16:07:41 +02:00
Brian Clozel 6ec264252b Ensure consistent value count in ConcurrentReferenceHashMap#Segment
Prior to this commit, the `ConcurrentReferenceHashMap#Segment` would
recalculate its element count during the restructure phase by
subtracting the number of polled elements from the queue to the current
count.
Later, the newly restructured `references` array would only contain
references that 1) are not in the set of elements to purge and
2) that hold a non-null value.

The issues with this approach are multiple. The newly calculated count
is only an estimate, as some situations can make it invalid, even
temporarily.

* since we initially collected all elements to be purged from the queue,
  the GC might have collected new values. This means that we might
  filter out more references that we initially intended to

* because the restructure operation re-creates new references for all
  elements in the original array, we might later get references from the
  queue that are not in the array anymore. This could lead to
  "duplicate" removals for the same value

Because several methods in the Segment class have special no-op behavior
when `count == 0`, an invalid count can lead to keys appearing missing
when they are actually still present. In some scenarios, this can
decrease the performance of the cache since values need to be
recalculated.

This commit fixes this inconsistency count issue by first using an
estimate in order to decide whether the array needs a resize and then by
counting the actual numbers of elements inserted in the restructured
array as the new count.

Fixes gh-31373
2023-10-19 15:54:31 +02:00
Brian Clozel c73c16f07f Configure JDK 22 compatibility build on CI
This commit does not enable this build right now as testing libraries
are not ready yet for JDK 22.

See gh-31459
2023-10-19 13:59:13 +02:00
Sébastien Deleuze c6b86af78b Fall back on UTF-8 charset in WebClientResponseException
Instead of ISO-8859-1, consistently with the change done
in RestClientResponseException.

Closes gh-31072
2023-10-19 12:59:12 +02:00