Commit Graph

1804 Commits

Author SHA1 Message Date
Sam Brannen
61c3d7a989 Merge branch '5.3.x' 2022-01-04 14:09:02 +01:00
Sam Brannen
03668f9c10 Replace remaining use of StringBuffer with StringBuilder
Although this commit only applies to test classes, it serves to reduce
the noise when searching for undesirable usage of StringBuffer in
production code.
2022-01-04 14:06:13 +01:00
Sam Brannen
97625e3658 Additional changes because HttpMethod changed from enum to class
See gh-27697
2022-01-03 16:12:14 +01:00
Juergen Hoeller
bfdb93b406 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	src/docs/asciidoc/integration.adoc
2021-12-14 16:51:00 +01:00
Juergen Hoeller
ca84559588 Provide findAnnotationOnBean variant with allowFactoryBeanInit flag
Closes gh-27796
2021-12-14 16:47:12 +01:00
Stephane Nicoll
8d93dc4abb Merge branch '5.3.x' 2021-12-14 14:05:18 +01:00
Stephane Nicoll
b06d267232 Remove references to AsyncConfigurerSupport
Closes gh-27812
2021-12-14 13:59:05 +01:00
Juergen Hoeller
7f43128a0e Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-web/src/main/java/org/springframework/web/server/MediaTypeNotSupportedStatusException.java
#	spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
2021-12-03 22:42:05 +01:00
Juergen Hoeller
14f24f43d7 Polishing 2021-12-03 22:36:31 +01:00
Arjen Poutsma
7a4207cd7b Changes because HttpMethod changed to class
This commit contains changes made because HttpMethod changed from enum
to class.

See gh-27697
2021-11-30 13:44:36 +01:00
김보배(Bobae Kim)/Platform Engineering팀/11ST
804b343cab Use parseInt without substring method 2021-11-25 16:14:59 +01:00
Sam Brannen
2be80b8fc8 Merge branch '5.3.x' 2021-11-18 19:23:49 +01:00
Sam Brannen
c37d6c30a0 Fix nullability declarations in MergedContextConfiguration 2021-11-18 19:23:28 +01:00
Juergen Hoeller
4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
Christoph Dreis
5c972fcc54 Use Charset variants of URLEncoder and URLDecoder methods 2021-11-10 16:12:11 +01:00
SungMin
32af39d6e6 Use 'toString(Charset)' instead of 'toString(String)' for encodings (#27646)
Co-authored-by: 홍성민(SungMin Hong)/Platform Engineering팀/11ST <devmonster@11stcorp.com>
2021-11-10 15:11:33 +01:00
Juergen Hoeller
75036fa0ad Merge branch '5.3.x' 2021-11-10 14:22:58 +01:00
Juergen Hoeller
15a6373fed Avoid nullability warnings 2021-11-10 14:22:06 +01:00
Sam Brannen
32c14a2b42 Update Javadoc regarding repeatable annotation support 2021-10-29 11:04:01 +02:00
Sam Brannen
d9e9a33b66 Merge branch '5.3.x' 2021-10-22 15:29:37 +02:00
xxpain
66826ac960 Fix typo in Javadoc in HeaderAssertions
Closes gh-27589
2021-10-22 15:28:27 +02:00
Sam Brannen
b8fc79543d Polish tests and test fixtures in spring-test 2021-10-14 22:12:23 +02:00
Sam Brannen
fba92c0120 Update copyright date 2021-10-14 16:03:39 +02:00
Sam Brannen
940a37f9ce Apply "final fields" Eclipse clean-up in spring-test
This has only been applied to `src/main/java`.
2021-10-14 15:53:54 +02:00
Sam Brannen
7e4870577d Apply "instanceof pattern matching" Eclipse clean-up in spring-test
This has only been applied to `src/main/java`.
2021-10-14 15:50:36 +02:00
Sam Brannen
373b90d263 Simplify JsonPathExpectationsHelperTests with text blocks 2021-10-13 20:43:13 +02:00
Sam Brannen
1ef47fa369 Use instanceof pattern matching in select classes in spring-test 2021-10-13 20:41:49 +02:00
Koen Punt
50b92118a9 Include correct keyword in CookieAssertions failure messages
Closes gh-27550
2021-10-13 14:02:55 +02:00
Koen Punt
daf10d6c45 Include correct keyword in CookieAssertions failure messages
Closes gh-27550
2021-10-13 14:00:29 +02:00
Sam Brannen
f479668938 Merge branch '5.3.x' 2021-10-11 15:00:00 +02:00
Sam Brannen
63fac1b7c8 Allow default CacheAwareContextLoaderDelegate configuration via system property
Prior to this commit, the default CacheAwareContextLoaderDelegate could
be configured by extending AbstractTestContextBootstrapper and
overriding getCacheAwareContextLoaderDelegate(); however, this required
that the user configure the custom TestContextBootstrapper via
@BootstrapWith.

This commit introduces a new
"spring.test.context.default.CacheAwareContextLoaderDelegate" property
that can be configured via a JVM system property or via the
SpringProperties mechanism. BootstrapUtils uses this new property to
load the default CacheAwareContextLoaderDelegate. If the property is
not defined, BootstrapUtils will fall back to creating a
DefaultCacheAwareContextLoaderDelegate as it did previously.

This allows third parties to configure the default
CacheAwareContextLoaderDelegate transparently for the user -- for
example, to intercept context loading in order to load the context in a
different manner -- for example, to make use of ahead of time (AOT)
techniques for implementing a different type of ApplicationContext at
build time.

Closes gh-27540
2021-10-11 14:59:09 +02: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
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
Juergen Hoeller
dc5807ea51 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/cglib/core/ReflectUtils.java
2021-09-30 17:37:28 +02:00
Juergen Hoeller
4f44ae3f28 Polishing 2021-09-30 17:34:22 +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
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
Sam Brannen
b808b53bcc Remove unnecessary cast in ContentRequestMatchers 2021-09-22 16:06:58 +02:00
Sam Brannen
69a46a7296 Merge branch '5.3.x' 2021-09-21 10:49:31 +02:00
Sam Brannen
28496059bc Make TestNG test methods public due to bug in TestNG TestEngine
This commit makes all test methods in our TestNG test classes public
due to the following bug in the TestNG engine for the JUnit Platform.

https://github.com/junit-team/testng-engine/issues/16

See gh-27407
2021-09-21 10:35:34 +02:00
Sam Brannen
40c51efee8 Introduce @Suite for TestNG tests
In order to allow developers to execute TestNG tests in Eclipse IDE
without installing the TestNG plugin for Eclipse, this commit introduces
a JUnit Platform @Suite class that can be executed within the IDE.

See gh-27407
2021-09-21 10:33:25 +02: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
Sam Brannen
04e6b233ca Upgrade to JUnit 5.8
Closes gh-27392
2021-09-13 16:38:30 +02:00
Sam Brannen
d1a00b4301 Polishing
See gh-27230
2021-09-06 16:58:32 +02:00
Sam Brannen
87d3d1bbd1 Throw UnsupportedOperationException in defaultResponseCharacterEncoding()
This commit updates the defaultResponseCharacterEncoding() `default`
method in ConfigurableMockMvcBuilder so that it throws an
UnsupportedOperationException instead of silently ignoring the user's
request to set the default response character encoding.

Note, however, that AbstractMockMvcBuilder already overrides the
default method with a concrete implementation which is used by default
in MockMvc.

See gh-27230
2021-09-06 16:55:11 +02:00