Commit Graph

23176 Commits

Author SHA1 Message Date
Sam Brannen
038b88e2a1 Polishing 2022-02-05 20:23:45 +01:00
Sam Brannen
eb84c84373 Polish contribution
See gh-27993
2022-02-05 20:15:30 +01:00
Gleidson Leopoldo
920be8e1b2 Add support for strict JSON comparison in WebTestClient
Prior to this commit, WebTestClient only supported "lenient" comparison
of the expected JSON body.

This commit introduces an overloaded variant of `json()` in the
BodyContentSpec that accepts an additional boolean flag to specify
whether a "strict" comparison should be performed.

This new feature is analogous to the existing support in MockMvc.

Closes gh-27993
2022-02-05 20:15:30 +01:00
Sam Brannen
a13ad3e969 Polishing 2022-02-05 20:15:30 +01:00
Stephane Nicoll
874432b38a Merge pull request #28010 from izeye
* pr/28010:
  Fix Javadoc since for AopProxyUtils.isLambda()

Closes gh-28010
2022-02-05 13:59:33 +01:00
izeye
4ab03fede8 Fix Javadoc since for AopProxyUtils.isLambda()
See gh-28010
2022-02-05 13:59:01 +01:00
Juergen Hoeller
5bbdd36e19 Upgrade to Checkstyle 9.3, HtmlUnit 2.58, Apache HttpClient 5.1.3 2022-02-04 23:51:23 +01:00
Juergen Hoeller
a22feac803 Update license header for https (nohttp rule)
See gh-27802
2022-02-04 23:51:05 +01:00
Juergen Hoeller
bc9cd9a687 Find interface method even for late-bound interface declaration in subclass
Closes gh-27995
2022-02-04 23:21:27 +01:00
Juergen Hoeller
a71a45e719 Deprecate AsyncTaskExecutor.execute(Runnable task, long startTimeout)
Closes gh-27959
2022-02-04 23:21:00 +01:00
Juergen Hoeller
132d8c7f45 Support for CGLIB BeanMap utility on JDK 17
Closes gh-27802
2022-02-04 23:19:06 +01:00
Sam Brannen
5d7a632965 Ensure Spring AOP generates JDK dynamic proxies for lambdas
Prior to this commit, if AOP proxy generation was configured with
proxyTargetClass=true (which is the default behavior in recent versions
of Spring Boot), beans implemented as lambda expressions or method
references could not be proxied with CGLIB on Java 16 or higher without
specifying `--add-opens java.base/java.lang=ALL-UNNAMED`.

This commit addresses this shortcoming by ensuring that beans
implemented as lambda expressions or method references are always
proxied using a JDK dynamic proxy even if proxyTargetClass=true.

Closes gh-27971
2022-02-04 19:59:35 +01:00
Stephane Nicoll
6bc7d41734 Merge pull request #28004 from An1s9n
* pr/28004:
  Polish reference to ManagedBean annotation

Closes gh-28004
2022-02-04 09:24:30 +01:00
Pavel Anisimov
05d3e820f9 Polish reference to ManagedBean annotation
See gh-28004
2022-02-04 09:23:32 +01:00
Sam Brannen
f8a5a8d7be Use modern language features in tests 2022-02-03 14:50:10 +01:00
Stephane Nicoll
82a2544918 Upgrade to spring javaformat 0.0.31 2022-02-03 08:49:16 +01:00
Stephane Nicoll
e702c22da4 Upgrade Ubuntu version in CI image 2022-02-03 08:48:52 +01:00
rstoyanchev
c4e362500b Polishing tests 2022-02-02 17:09:04 +00:00
rstoyanchev
8d5a6520ce Ensure all converters don't close InputStream
Closes gh-27969
2022-02-02 15:55:13 +00:00
rstoyanchev
4effca35b5 Ignore Content-Type that is invalid (not concrete)
Closes gh-27957
2022-02-02 15:55:07 +00:00
Arjen Poutsma
8f9a1cdc0c Consider current date in "1W" cron expressions
Prior to this commit, the QuartzCronField::weekdayNearestTo would elapse
until the next month before checking if the current day matched.

After this commit, the current day is checked before we elapse until
the next month.

Closes gh-27966
2022-02-01 13:51:40 +01:00
Stephane Nicoll
136bd2002e Upgrade to spring javaformat 0.0.30 2022-01-31 09:34:12 +01:00
Sam Brannen
a749a6bf54 Stop applying Groovy plugin for the root Gradle project
The root project does not rely on the Groovy plugin.

See gh-27945
2022-01-30 15:49:59 +01:00
Sam Brannen
7072aab53b Improve log message when searching for default executor for async processing
Closes gh-27983
2022-01-30 15:44:40 +01:00
Sam Brannen
dbeae27d3c Reduce build time by reducing shutdown wait period for Jetty tests 2022-01-29 12:41:39 +01:00
Sam Brannen
fb312d0ed5 Improve Javadoc for DatabasePopulator
See gh-27008
2022-01-28 16:40:35 +01:00
Sam Brannen
0e670b1c15 Polish contribution
See gh-27984
2022-01-28 16:15:21 +01:00
wkwkhautbois
fadfcf4e43 Fix ServletUriComponentsBuilder examples in ref docs
Closes gh-27984
2022-01-28 16:10:54 +01:00
Arjen Poutsma
caa13690e8 Support multiple boundary buffers in MultipartParser
In a small minority of cases, the multipart boundary can spread across
three incoming buffers.

Prior to this commit, MultipartParser.BodyState only supported two
buffers. If the boundary is spread across three buffers, the first
buffer of the three is sent as a whole, even though it contains the
first bytes of the boundary.

This commit fixes this bug, by enqueuing all prior buffers in a queue,
and emitting the ones that cannot contain boundary bytes.

Closes gh-27939
2022-01-28 13:42:24 +01:00
Sam Brannen
6647023151 Document how to register annotated classes in a GenericWebApplicationContext
Closes gh-27778
2022-01-27 16:08:16 +01:00
Sam Brannen
e32f94bf8c Polish GenericWebApplicationContext and AnnotationConfigWebApplicationContext 2022-01-27 16:08:07 +01:00
Stephane Nicoll
bd6d697395 Upgrade Java versions in CI image 2022-01-27 09:52:25 +01:00
Sam Brannen
7f65e17ff2 Improve documentation for implementing AspectJ around advice
Closes gh-27980
2022-01-26 17:32:48 +01:00
Sam Brannen
9095f1d584 Polish AspectJ documentation 2022-01-26 17:32:48 +01:00
Stephane Nicoll
4f16d5b5b2 Merge pull request #27826 from Drezir
* pr/27826:
  Polish "Add CacheErrorHandler implementation that logs exceptions"
  Add CacheErrorHandler implementation that logs exceptions

Closes gh-27826
2022-01-26 14:12:13 +01:00
Stephane Nicoll
6a6c7df824 Polish "Add CacheErrorHandler implementation that logs exceptions"
See gh-27826
2022-01-26 14:10:49 +01:00
Adam Ostrožlík
5c9fbcc23c Add CacheErrorHandler implementation that logs exceptions
See gh-27826
2022-01-26 14:10:49 +01:00
Sam Brannen
f4f5cee76c Polish AOP namespace tests 2022-01-26 12:29:30 +01:00
Sam Brannen
bf1cf549b1 Delete unused XML config in AOP namespace tests
See gh-22246
2022-01-26 12:15:10 +01:00
Juergen Hoeller
1272cd557d Upgrade to SmallRye Mutiny 1.3.1, Aalto 1.3.1, Woodstox 6.2.8 2022-01-26 00:02:12 +01:00
Juergen Hoeller
993b6d1351 Upgrade to Tomcat 9.0.58, Protobuf 3.19.3, Rome 1.18, H2 2.1.210, SLF4J 1.7.35, Mockito 4.3.1, HtmlUnit 2.57, XMLUnit 2.9, Checkstyle 9.2.1 2022-01-25 23:51:22 +01:00
Juergen Hoeller
0a92d84778 Check open status before close call (aligned with EntityManagerFactoryUtils)
Closes gh-27972
2022-01-25 23:50:45 +01:00
Sam Brannen
652c13a6ea Enable ReflectionUtilsTests.findMethodWithVarArgs()
See gh-13286
2022-01-25 09:58:57 +01:00
Sam Brannen
cb3fa89946 Polish ReflectionUtilsTests 2022-01-25 09:57:36 +01:00
Sam Brannen
d01dca14e9 Filter methods in Object in ReflectionUtils.USER_DECLARED_METHODS
Prior to this commit, the USER_DECLARED_METHODS MethodFilter in
ReflectionUtils did not actually filter methods declared in
java.lang.Object as stated in its Javadoc.

Consequently, if ReflectionUtils.doWithMethods was invoked with
USER_DECLARED_METHODS and Object.class as the class to introspect, all
non-bridge non-synthetic methods declared in java.lang.Object were
passed to the supplied MethodCallback, which breaks the contract of
USER_DECLARED_METHODS.

In addition, if USER_DECLARED_METHODS was composed with a custom
MethodFilter using `USER_DECLARED_METHODS.and(<custom MethodFilter>)`,
that composed method filter allowed all non-bridge non-synthetic
methods declared in java.lang.Object to be passed to the supplied
MethodCallback, which also breaks the contract of
USER_DECLARED_METHODS. This behavior resulted in regressions in code
that had previously used USER_DECLARED_METHODS by itself and then began
using USER_DECLARED_METHODS in a composed filter. For example, since
commit c419ea7ba7 ReflectiveAspectJAdvisorFactory has incorrectly
processed methods in java.lang.Object as candidates for advice methods.

This commit fixes this bug and associated regressions by ensuring that
USER_DECLARED_METHODS actually filters methods declared in
java.lang.Object. In addition, ReflectionUtils.doWithMethods now aborts
its search algorithm early if invoked with the USER_DECLARED_METHODS
filter and Object.class as the class to introspect.

Closes gh-27970
2022-01-24 20:09:22 +01:00
Sam Brannen
d698446f7c Polish ReflectionUtils[Tests] 2022-01-24 19:46:40 +01:00
Stephane Nicoll
5ef023afd2 Merge pull request #27967 from arey
* pr/27967:
  Fix CaffeineCacheManager configuration example in reference doc

Closes gh-27967
2022-01-22 10:42:08 +01:00
Antoine Rey
316764cad0 Fix CaffeineCacheManager configuration example in reference doc
See gh-27967
2022-01-22 10:40:47 +01:00
Sam Brannen
a681d6af22 Fix Javadoc links to JSR 305 annotations where feasible
Prior to this commit, we only (indirectly) configured external Javadoc
links for types in the javax.annotation package for JSR 250, since
those types are part of Java 8 SE. However, an external Javadoc link
for types from JSR 305 was not configured.

To address this issue, this commit now configures an external Javadoc
link for JSR 305 types. However, the external Javadoc link for JSR 305
must be configured last to ensure that types from JSR 250 (such as
@PostConstruct) are still supported. This is due to the fact that JSR
250 and JSR 305 both define types in javax.annotation, which results in
a split package, and the javadoc tool does not support split packages
across multiple external Javadoc sites. Instead, the Javadoc tool
iterates over all external links, and the first external site that
claims to support a given package (via the package-list file) wins.

This means:

- Javadoc for JSR 250 annotations is fully supported.
- Javadoc for JSR 305 annotations in the javax.annotation package will
  continue to result in a 404 (page not found) error.
- Javadoc for JSR 305 annotations in the javax.annotation.meta package
  is fully supported.

For Spring Framework 6.0, the Javadoc for JSR 250 types in
jakarta.annotation package is served from the JBoss Application Server
Javadoc site instead of from Oracle's Java SE documentation site, since
JSR 250 annotations are no longer included in Java SE.

Closes gh-27904
2022-01-21 16:07:55 +01:00
shirohoo
7211912057 Polish tests in spring-web
This PR polishes trivial things in tests in spring-web.

Closes gh-27958
2022-01-20 15:44:24 +01:00