Commit Graph

29652 Commits

Author SHA1 Message Date
Stéphane Nicoll
b46e528922 Add AssertJ support for the HTTP handler
This commit adds AssertJ compatible assertions for the component that
produces the result from the request.

See gh-21178
2024-03-15 13:28:12 +01:00
Stéphane Nicoll
e97ae434fb Add AssertJ support for HTTP requests and responses
This commit adds AssertJ compatible assertions for HTTP request and
responses, including headers, media type, and response body. The latter
delegate to the recently included JSON assert support.

See gh-21178
2024-03-15 13:28:11 +01:00
Stéphane Nicoll
76f45c4289 Add support for JSON assertions using JSON path
This commit moves JSON path AssertJ support from Spring Boot.

See gh-21178

Co-authored-by: Brian Clozel <brian.clozel@broadcom.com>
2024-03-15 13:28:11 +01:00
Stéphane Nicoll
97ebc43ea9 Add support for JSON assertions using JSON compare
This commit moves JSON content AssertJ support from Spring Boot.

See gh-21178

Co-authored-by: Brian Clozel <brian.clozel@broadcom.com>
2024-03-15 13:28:11 +01:00
Stéphane Nicoll
214a54dd6f Run CI on main only once a day 2024-03-15 08:40:09 +01:00
Stéphane Nicoll
875037c431 Merge branch '6.1.x' 2024-03-15 08:28:24 +01:00
Stéphane Nicoll
68a3993897 Merge pull request #32446 from LinorDolev
* pr/32446:
  Polish "Fix default strategy description of ProblemDetail error codes"
  Fix default strategy description of ProblemDetail error codes

Closes gh-32446
2024-03-15 08:28:19 +01:00
Stéphane Nicoll
dfc1b839f3 Polish "Fix default strategy description of ProblemDetail error codes"
See gh-32446
2024-03-15 08:27:59 +01:00
Linor Dolev
302c24aaa8 Fix default strategy description of ProblemDetail error codes
See gh-32446
2024-03-15 08:02:20 +01:00
Stéphane Nicoll
35e8ae2a84 Merge branch '6.1.x' 2024-03-14 17:47:51 +01:00
Stéphane Nicoll
7357812b4e Polish "Only include production branches for docs deployment"
See gh-32434
2024-03-14 17:47:12 +01:00
Stéphane Nicoll
26cab0616e Merge branch '6.1.x' 2024-03-14 17:43:32 +01:00
Stéphane Nicoll
30087e1aea Only include production branches for docs deployment
Closes gh-32434
2024-03-14 17:42:02 +01:00
Sam Brannen
e1b1435a00 Stop referring to JDK 1.5 plus polishing 2024-03-14 16:00:51 +01:00
Stéphane Nicoll
8e2134c6a7 Merge branch '6.1.x' 2024-03-14 15:29:18 +01:00
Stéphane Nicoll
cd5758e610 Restore CI execution per commit
As scheduled only works on the base branch anyway

See gh-32436
2024-03-14 15:28:23 +01:00
Stéphane Nicoll
7c7a59bdd2 Merge branch '6.1.x' 2024-03-14 15:17:47 +01:00
Stéphane Nicoll
b82a0dd31a Polish "Move CI and snapshot deployment to GitHub actions"
See gh-32436
2024-03-14 15:16:02 +01:00
Stéphane Nicoll
acd69d38e9 Merge branch '6.1.x' 2024-03-14 15:05:46 +01:00
Stéphane Nicoll
b7280400ee Move CI and snapshot deployment to GitHub actions
Closes gh-32436
2024-03-14 15:01:26 +01:00
Sam Brannen
4a3daa7812 Polishing 2024-03-14 14:20:59 +01:00
Sam Brannen
27d5213176 Polish Javadoc for @⁠TestBean support 2024-03-14 13:44:27 +01:00
Stéphane Nicoll
19dfc781f5 Build Pull Requests on CI using GitHub Actions
Closes gh-32443
2024-03-14 11:10:41 +01:00
Spring Builds
a3345920ec Next development version (v6.1.6-SNAPSHOT) 2024-03-14 09:58:35 +00:00
rstoyanchev
1d2b55e670 Merge branch '6.1.x' 2024-03-14 08:46:46 +00:00
rstoyanchev
381f790329 Extract reusable checkSchemeAndPort method
Closes gh-32440
2024-03-14 08:45:38 +00:00
Juergen Hoeller
7f7c0d59f6 Merge branch '6.1.x' 2024-03-13 18:07:21 +01:00
Juergen Hoeller
f5a3658535 Upgrade to Protobuf 3.25.3, Woodstox 6.6.1, JsonPath 2.9, QDox 2.1 2024-03-13 18:06:44 +01:00
Juergen Hoeller
54a6d89da7 Additional unit tests for operations on empty UriTemplate
See gh-32432
2024-03-13 18:06:17 +01:00
Stéphane Nicoll
7d4db434a5 Merge branch '6.1.x' 2024-03-13 17:28:23 +01:00
Stéphane Nicoll
2922a82275 Merge pull request #32432 from bsgrd
* pr/32432:
  Polish "Allow UriTemplate to be built with an empty template"
  Allow UriTemplate to be built with an empty template

Closes gh-32432
2024-03-13 17:27:52 +01:00
Stéphane Nicoll
a34ceb405c Polish "Allow UriTemplate to be built with an empty template"
See gh-32432
2024-03-13 17:21:46 +01:00
Kasper Bisgaard
1b25a1506a Allow UriTemplate to be built with an empty template
See gh-32432
2024-03-13 17:20:08 +01:00
Sam Brannen
986c4fd926 Revise use of Objects.requireNonNull()
Historically, we have rarely intentionally thrown a
NullPointerException in the Spring Framework. Instead, we prefer to
throw either an IllegalArgumentException or IllegalStateException
instead of a NullPointerException.

However, changes to the code in recent times have introduced the use of
Objects.requireNonNull(Object) which throws a NullPointerException
without an explicit error message.

The latter ends up providing less context than a NullPointerException
thrown by the JVM (since Java 14) due to actually de-referencing a
null-pointer. See https://openjdk.org/jeps/358.

In light of that, this commit revises our current use of
Objects.requireNonNull(Object) by removing it or replacing it with
Assert.notNull().

However, we still use Objects.requireNonNull(T, String) in a few places
where we are required to throw a NullPointerException in order to
comply with a third-party contract such as Reactive Streams.

Closes gh-32430
2024-03-13 16:00:22 +01:00
Sam Brannen
d6422d368a Revise @⁠TestBean support
See gh-29917
2024-03-13 16:00:22 +01:00
Sam Brannen
21ed8aad74 Add missing test 2024-03-13 15:59:28 +01:00
Sam Brannen
7211db9262 Polishing 2024-03-13 15:59:28 +01:00
Juergen Hoeller
3b87c87a33 Merge branch '6.1.x' 2024-03-12 20:11:21 +01:00
Juergen Hoeller
723c94e5ac Polishing 2024-03-12 20:10:01 +01:00
Juergen Hoeller
e5a69dcfdf Upgrade to Reactor 2023.0.4 and Micrometer 1.12.4
Includes AspectJ 1.9.21.1, Groovy 4.0.19, Tomcat 10.1.19, Jetty 12.0.7, Jackson 2.15.4, OpenPDF 1.3.42, Mockito 5.11, Checkstyle 10.14.1

Closes gh-32420
Closes gh-32431
2024-03-12 20:07:58 +01:00
Sébastien Deleuze
460ffbc0f6 Use code includes and tabs in mvc-controller/ann.adoc
See gh-22171
2024-03-12 19:18:42 +01:00
Sébastien Deleuze
8a67018e61 Use code includes and tabs in embedded-database-support.adoc
See gh-22171
2024-03-12 17:46:38 +01:00
Sébastien Deleuze
68ae1e5700 Fix a link in MockitoResetTestExecutionListener javadoc 2024-03-12 17:43:10 +01:00
Brian Clozel
4b732d62c2 Deprecate HttpHeaders.writableHttpHeaders
Prior to this commit, gh-21783 introduced `ReadOnlyHttpHeaders` to avoid
parsing media types multiple times during the lifetime of an HTTP
exchange: such values are cached and the headers map is made read-only.
This also added a new `HttpHeaders.writableHttpHeaders` method to unwrap
the read-only variant when needed.

It turns out this method sends the wrong signal to the community
because:
* the underlying map might be unmodifiable even if this is not an
  instance of ReadOnlyHttpHeaders
* developers were assuming that modifying the collection that backs the
  read-only instance would work around the cached values for
  Content-Type and Accept headers

This commit adds more documentation to highlight the desired behavior
for cached values by the read-only variant, and deprecates the
`writableHttpHeaders` method as `ReadOnlyHttpHeaders` is package private
and we should not surface that concept anyway.
Instead, this commit unwraps the read-only variant if needed when a new
HttpHeaders instance is created.

Closes gh-32116
2024-03-12 14:04:09 +01:00
rstoyanchev
670fc9bb4e Merge branch '6.1.x' 2024-03-12 11:43:43 +00:00
Xednar
c2248c968c Update Javadoc in DefaultUserDestinationResolver
Closes gh-32272
2024-03-12 11:43:24 +00:00
Sébastien Deleuze
7a65aad09c Merge branch '6.1.x' 2024-03-12 12:24:30 +01:00
Sébastien Deleuze
9cc74e78f8 Refine "Redirecting to a resource" section code sample
The commit updates the code sample to use a null element friendly list.

Closes gh-32423
2024-03-12 12:22:37 +01:00
Sébastien Deleuze
b1bf8c5242 Prevent NPE when using pathExtension predicate
This commit ensures pathExtension predicate is skipped when the value
is null, in order to provide a more predictable behavior, and allow
a better compatibility with collections not supporting null elements
like the ones created by List#of.

Closes gh-32404
2024-03-12 12:11:50 +01:00
rstoyanchev
6767f7010c Polishing contribution
Closes gh-29958
2024-03-12 10:43:32 +00:00