Commit Graph

3725 Commits

Author SHA1 Message Date
Juergen Hoeller
56eefe2a13 Merge branch '5.3.x' 2021-10-08 20:42:54 +02:00
Juergen Hoeller
87aaf5049b Polishing 2021-10-08 20:41:51 +02:00
Juergen Hoeller
4b01370f54 UriTemplateRequestEntity overrides equals/hashCode
Closes gh-27531
2021-10-08 20:41:18 +02:00
Rossen Stoyanchev
f14bd50033 Prune empty method adapter classes 2021-10-08 18:20:09 +01:00
Rossen Stoyanchev
e3b48c23dd Remove AsyncRestTemplate and related types 2021-10-08 17:59:53 +01:00
Sam Brannen
2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00
Sam Brannen
41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00
Arjen Poutsma
fb7eea9757 Merge branch '5.3.x' 2021-10-05 16:32:55 +02:00
Arjen Poutsma
c99210c01f Propagate Reactor Context when using FluxSink
This commit makes sure that the Reactor context from a given mono or
flux is propagated to the Flux returned by a FluxSink. This change
affects both DataBufferUtils::write and internal classes used by the
DefaultPartHttpMessageReader.

Closes gh-27517
2021-10-05 16:30:49 +02:00
Sam Brannen
381b7d035a Merge branch '5.3.x' 2021-10-05 14:55:22 +02:00
Sam Brannen
48a507a993 Clean up warnings 2021-10-05 14:35:32 +02:00
Rossen Stoyanchev
837dd30661 Merge branch '5.3.x' into main 2021-10-05 12:16:42 +01:00
Rossen Stoyanchev
e68219c1ac ResponseStatusExceptionHandler logs exception message only
No need to log the full exception for a resolved exception, and as the
comment suggests that it mirrors Spring MVC equivalent, which also
logs the message only.
2021-10-05 12:12:17 +01:00
Juergen Hoeller
49427b0c3c Upgrade to Apache Johnzon 1.2.14, Vavr 0.10.4, WebJars Locator 0.48, HtmlUnit 2.53 2021-10-02 12:08:09 +02:00
Sam Brannen
cb9246e481 Merge branch '5.3.x' 2021-10-01 10:36:28 +02:00
Sam Brannen
f0aa4f4857 Escape closing curly braces in regular expressions for Android support
PR gh-24470 introduced a regression for Android users by no longer
escaping closing curly braces in regular expressions.

This commit therefore partially reverts the changes made in 273812f9c5
for closing curly braces (`}`).

Closes gh27467
2021-10-01 10:35:28 +02:00
Arjen Poutsma
a4b74a320e Merge branch '5.3.x' 2021-09-30 17:12:41 +02:00
Arjen Poutsma
bfa01b35df Polishing
See gh-27488
2021-09-30 17:09:03 +02:00
Arjen Poutsma
4f61e9cdee Merge branch '5.3.x' 2021-09-30 16:17:36 +02:00
Arjen Poutsma
388c8e4aa5 Make sure that MediaType comparators are transitive
Previous to this commit, the specificity and quality comparators
(used by MediaType::sortByQualityValue and MediaType::sortBySpecificity)
could result in IllegalArgumentExceptions when used for sorting.
The underlying reason was that the comparators were not transitive, and
both media types with the same type, and types with the same amount of
parameters, would be considered identical by the comparator (result 0).

This commit ensures that the comparators are transitive.

Closes gh-27488
2021-09-30 16:15:38 +02:00
Sam Brannen
030ba52805 Merge branch '5.3.x' 2021-09-29 16:56:33 +02:00
Sam Brannen
96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Juergen Hoeller
4d7fa9a632 Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
2021-09-28 18:18:23 +02:00
Juergen Hoeller
86b010a6b2 Defensive reference to JNDI API for JDK 9+ (optional java.naming module)
Closes gh-27483
2021-09-28 18:15:22 +02:00
Arjen Poutsma
1e6c0d2f7b Merge branch '5.3.x' 2021-09-28 15:00:33 +02:00
Arjen Poutsma
3be2b32e21 Remove only leading space for SSE data
Prior to this commit, all white space was trimmed from Server Sent Event
data. After this commit, only a leading space is removed (if present).

Closes gh-27473
2021-09-28 14:56:39 +02:00
Sam Brannen
08bce08018 Use text blocks with JUnit Jupiter 5.8.1
See gh-27450
2021-09-28 14:20:31 +02:00
Sam Brannen
85bdea6f47 Fix code formatting in Javadoc
See gh-27480
2021-09-28 13:41:25 +02:00
Sam Brannen
93efb20a53 Fix broken links in Javadoc
This commit removes several links that were broken due to the removal
of various APIs in 6.0.

See gh-27480
2021-09-28 13:34:33 +02:00
Sam Brannen
3dc84c2d92 Merge branch '5.3.x' 2021-09-28 11:48:50 +02:00
Sam Brannen
bfdc99ab79 Fix Javadoc errors
See gh-27480
2021-09-28 11:44:12 +02:00
Sam Brannen
16bf39ea1b Merge branch '5.3.x' 2021-09-28 10:35:18 +02:00
Sam Brannen
2567b20949 Upgrade to spring-javaformat 0.0.28 and downgrade to Checkstyle 8.41
In order to be able to use text blocks and other new Java language
features, we are upgrading to a recent version of Checkstyle.

The latest version of spring-javaformat-checkstyle (0.0.28) is built
against Checkstyle 8.32 which does not include support for language
features such as text blocks. Support for text blocks was added in
Checkstyle 8.36.

In addition, there is a binary compatibility issue between
spring-javaformat-checkstyle 0.0.28 and Checkstyle 8.42. Thus we cannot
use Checkstyle 8.42 or higher.

In this commit, we therefore upgrade to spring-javaformat-checkstyle
0.0.28 and downgrade to Checkstyle 8.41.

This change is being applied to `5.3.x` as well as `main` in order to
benefit from the enhanced checking provided in more recent versions of
Checkstyle.

Closes gh-27481
2021-09-28 10:29:31 +02:00
Rossen Stoyanchev
853ab5d67b Fix Jetty 10+ test failure related to empty path handling
See gh-27424
2021-09-17 14:53:27 +01:00
Rossen Stoyanchev
513cc1576e Fix Jetty WebSocket test failures for WebFlux
See gh-27424
2021-09-17 14:53:17 +01:00
Rossen Stoyanchev
b732ff3495 Ensure mutable headers for Jetty WebFlux request
In Jetty 10, request headers are immutable, see
https://github.com/eclipse/jetty.project/pull/4777, but we need to
remove/hide forwarded headers when they have been used.

See gh-27424
2021-09-17 14:52:45 +01:00
Juergen Hoeller
d84ca2ba90 Jakarta EE 9 migration
Upgrades many dependency declarations; removes old EJB 2.x support and outdated Servlet-based integrations (Commons FileUpload, FreeMarker JSP support, Tiles).

Closes gh-22093
Closes gh-25354
Closes gh-26185
Closes gh-27423
See gh-27424
2021-09-17 09:14:07 +02:00
Juergen Hoeller
5822f1bf85 Drop RPC-style remoting
Closes gh-27422
2021-09-17 08:59:58 +02:00
Juergen Hoeller
b7b078d26e Remove Joda-Time support
Closes gh-27426
2021-09-17 08:58:40 +02:00
Juergen Hoeller
b74e93807e Remove JDK 9 workarounds etc
See gh-17778
2021-09-17 08:58:19 +02:00
Juergen Hoeller
cf2429b0f0 Remove support for deprecated Java SecurityManager (-> JDK 17 build compatibility)
Includes hard JDK 9+ API dependency in CGLIB ReflectUtils (Lookup.defineClass) and removal of OutputStream spy proxy usage (avoiding invalid Mockito proxy on JDK 17)

Closes gh-26901
2021-09-15 15:30:25 +02:00
Rossen Stoyanchev
caf88ff2cc Improve HandlerMethod#bridgedMethod initialization
Ensure makeAccessible is called once when the bridgedMethod is
initialized.

Closes gh-19795
2021-09-14 14:58:11 +01:00
Phillip Webb
52b03e3326 Migrate CoroutinesUtils to Java
Migrate `CoroutinesUtils` from Kotlin code to Java and drop the
`kotlin-coroutines` module.

This update removes the need for Kotlin tooling IDE plugins to be
installed.

Closes gh-27379
2021-09-13 17:39:45 +02:00
Sam Brannen
04e6b233ca Upgrade to JUnit 5.8
Closes gh-27392
2021-09-13 16:38:30 +02:00
Brian Clozel
cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Sam Brannen
c3e424c29a Polishing 2021-09-10 16:01:23 +02:00
Rossen Stoyanchev
c23f0cd070 Polishing contribution
See gh-27374
2021-09-10 11:22:01 +01:00
Ruslan Stelmachenko
63ffa710d6 Include all bytes of body in UnknownContentTypeException
HttpMessageConverterExtractor uses MessageBodyClientHttpResponseWrapper
which may read the first byte of the response stream to check if there
is content. After that it is necessary to use the wrapper to get the
full body.

This commit ensures that when UnknownContentTypeException is raised
it gets the body through the wrapper, or otherwise the first byte is
missed if the InputStream is not markable.

Closes gh-27374
2021-09-10 10:42:08 +01:00
Sam Brannen
d8191b4808 Polish contribution
See gh-26984
2021-09-07 14:24:57 +02:00
Yin-Jui
417bce8be5 Add tests for MessageBodyClientHttpResponseWrapper
Closes gh-26984
2021-09-07 14:24:57 +02:00