Commit Graph

23462 Commits

Author SHA1 Message Date
Marc Wrobel
6985fa8057 Fix and improve Javadoc in spring-webmvc
Closes gh-28789
2022-07-12 10:39:03 +02:00
Marc Wrobel
03f0c57704 Fix and improve Javadoc in spring-websocket
Closes gh-28788
2022-07-11 21:30:32 +02:00
Sam Brannen
d274e893a6 Remove superfluous static declaration for enum, annotation, & interface 2022-07-09 16:16:13 +02:00
Arjen Poutsma
aa8b06b622 Delete file on multipart cancel
This commit makes sure that the temporary file used for multipart
storage is deleted when the source stream is malformed or cancelled.

Closes gh-28740
2022-07-08 16:36:01 +02:00
Sam Brannen
323dbb912e Move convention-based attribute override tests to @Nested class 2022-07-06 13:19:41 +02:00
rstoyanchev
63d7e81a48 Switch to Reactor 2020-0.21 snapshots
See gh-28765
2022-07-06 11:30:44 +01:00
Sam Brannen
07960d4918 Polishing 2022-07-06 11:44:15 +02:00
Sam Brannen
07cfcbc3a9 Move convention-based attribute override tests to @Nested class 2022-07-06 11:42:39 +02:00
Sam Brannen
2af27d899f Trim string input in Converters where whitespace is irrelevant
Closes gh-28756
2022-07-05 13:53:00 +02:00
Sam Brannen
0621a8eff1 Fix concurrency issues in FreeMarkerMacroTests
Prior to this commit, tests in these two classes intermittently failed
with errors similar to the following, due to concurrent modification
of shared files.

expected:
  "<input type="text" id="name" name="name" value="Darren"     >"
 but was:
  "<input type="text" id="name" name="name" value="Darren"     >

  "hidden"/>"

This commit fixes this by creating a new temporary folder for each test
method invocation.
2022-07-05 13:17:50 +02:00
Sam Brannen
7ac646bc96 Upgrade to TestNG Engine 1.0.4 2022-07-05 12:43:05 +02:00
Sam Brannen
2c3243c93c Trim string input in PropertyEditors where whitespace is irrelevant
Closes gh-28755
2022-07-04 19:24:58 +02:00
Sam Brannen
2bf5f7a6b3 Introduce lenient parsing in DataSize regarding whitespace
Prior to this commit, a DataSize input string could not be parsed if it
contained any whitespace.

With this commit, a DataSize input string can contain leading, trailing,
or 'in between' whitespace. For example, the following will be parsed
to the same DataSize value.

- "1024B"
- "1024 B"
- " 1024B "
- " 1024 B "

Closes gh-28643
2022-07-04 19:24:58 +02:00
Sam Brannen
bf39492c34 Introduce StringUtils.trimAllWhitespace(CharSequence)
Closes gh-28757
2022-07-04 19:24:45 +02:00
rstoyanchev
007bdede46 Add missing check to avoid re-initialization
Noticed during review of #28736 that a check protecting against
re-initialization was accidentally removed in commit
3d6e38bb43.
2022-07-04 16:17:57 +01:00
rstoyanchev
22cc6c5918 Polishing contribution
Closes gh-28736
2022-07-04 16:12:57 +01:00
CodeInDreams
461ba53b39 Qualify channelExecutor and taskScheduler in WebSocket config
See gh-28736
2022-07-04 15:51:40 +01:00
Sam Brannen
d1d6eb095e Fix GenericApplicationContextTests on Microsoft Windows (round 2)
The previous change to the tests resulted in a failure on Windows when
using the DefaultResourceLoader by expecting an exception when no
exception is thrown.

This commit narrows the scope of the if-clause to expect an exception
only when using the FileSystemResourceLoader on Windows.

See gh-28703, gh-28746
2022-07-03 17:59:37 +02:00
Sam Brannen
f732fab820 Delete unused imports and dead code in CGLIB fork 2022-07-03 17:30:30 +02:00
Sam Brannen
fda3f8201a Switch warning level for forbidden reference to INFO in Eclipse IDE 2022-07-03 17:23:55 +02:00
Sam Brannen
e608b36713 Improve GenericApplicationContextTests.getResource*() tests
This commit updates the tests so that they test something meaningful on
MS Windows as well as on Linux/Mac.

See gh-28703, gh-28746
2022-07-03 14:36:41 +02:00
jason
59180e76a7 Fix GenericApplicationContextTests on Microsoft Windows
The tests introduced in commit 9868c28c73 pass on Mac OS and Linux but
fail on Microsoft Windows.

This commit updates the tests so that they pass on MS Windows as well.

See gh-28703
Closes gh-28746
2022-07-03 14:35:07 +02:00
Sam Brannen
c5987d7c37 Fix typo in test 2022-07-02 17:09:07 +02:00
Sam Brannen
5650e20edd Polishing 2022-07-01 10:42:23 +02:00
Johnny Lim
2885177f5b Add @since tag for new CannotGetJdbcConnectionException constructor
See gh-28669
Closes gh-28738
2022-07-01 10:39:35 +02:00
rstoyanchev
058ce36402 Improve ExtendedWebExchangeDataBinder implementation
Close gh-28646
2022-07-01 03:23:32 +01:00
Vikey Chen
2afe560e41 Replace forEach with putAll
See gh-28646
2022-07-01 03:01:12 +01:00
rstoyanchev
b95362a3fd Avoid request params access for form data in logRequest
Close gh-28587
2022-07-01 02:55:16 +01:00
Sam Brannen
9ea45697ac Support cookie comments in MockHttpServletResponse and MockCookie
Prior to this commit, if a cookie was added to MockHttpServletResponse,
the comment attribute was not included in the generated Set-Cookie
header. In addition, MockCookie.parse(String) did not support the
Comment attribute.

This commit addresses both of these issues.

Closes gh-28730
2022-06-30 16:51:43 +02:00
Johnny Lim
fe2b8580a0 Upgrade to Gradle Enterprise Conventions 0.0.10 2022-06-30 14:59:55 +02:00
Sam Brannen
622fc3edf7 Fix merged annotation attributes regression
Commit d6768ccc18 introduced a regression in the support for merging
annotation attributes in a multi-level annotation hierarchy.

This commit addresses that issue by ensuring that a merged annotation
is once again synthesized if a meta-annotation in the annotation
hierarchy declares attributes that override attributes in the target
annotation.

Closes gh-28716
2022-06-28 14:22:53 +02:00
Sam Brannen
9868c28c73 Honor ProtocolResolvers in GenericApplicationContext
When the ProtocolResolver SPI was introduced in Spring Framework 4.3,
support for protocol resolvers was added in DefaultResourceLoader's
getResource() implementation; however, GenericApplicationContext's
overridden getResource() implementation was not updated accordingly.

Prior to this commit, if a GenericApplicationContext was configured
with a custom ResourceLoader, registered protocol resolvers were
ignored.

This commit ensures that protocol resolvers are honored in
GenericApplicationContext even if a custom ResourceLoader is used.

Closes gh-28703
2022-06-27 18:00:29 +02:00
Sam Brannen
a970516080 Polish GenericApplicationContextTests 2022-06-27 17:05:02 +02:00
Sam Brannen
0c9def89de Ignore build artifacts from the main branch for nohttp 2022-06-27 15:05:05 +02:00
Sam Brannen
8892a05868 Ignore /spring-core/graalvm/build artifacts from the main branch
This commit eases switching between the `main` and `5.3.x` branches.
2022-06-27 14:43:06 +02:00
Sam Brannen
d6768ccc18 Ensure meta-annotations are not unnecessarily synthesized
Prior to this commit, meta-annotations were unnecessarily synthesized
when attempting to synthesize a MergedAnnotation retrieved via the
MergedAnnotations.from(AnnotatedElement, ...).get(<annotationType>) API.

This is a regression in our merged annotation support that was
introduced when the MergedAnnotations API replaced our previous support.

This commit fixes this by revising the logic in TypeMappedAnnotation's
createSynthesizedAnnotation() method so that a meta-annotation is
returned unmodified if it is not synthesizable.

This commit also updates BootstrapUtilsTests, since @BootstrapWith
should never have been synthesized, and Class#getCanonicalName() is
only used in the toString() implementation of an annotation synthesized
by Spring or normal annotations on Java 19+ (see
https://bugs.openjdk.org/browse/JDK-8281462).

Closes gh-28704
2022-06-25 20:02:04 +02:00
Sam Brannen
faf20b7a5a Polish MergedAnnotations Javadoc and internals 2022-06-25 19:50:03 +02:00
Sam Brannen
661996471e Polishing 2022-06-25 19:24:51 +02:00
Stephane Nicoll
5639ff0939 Merge pull request #28669 from kevin0x90
* pr/28669:
  Polish "Fix DataSourceUtils inconsistent exception handling"
  Fix DataSourceUtils inconsistent exception handling

Closes gh-28669
2022-06-23 09:04:40 +02:00
Stephane Nicoll
e98b602d4f Polish "Fix DataSourceUtils inconsistent exception handling"
See gh-28669
2022-06-23 09:01:39 +02:00
Kevin Schönfeld
edfe5d2f18 Fix DataSourceUtils inconsistent exception handling
Align IllegalStateException with SQLException handling and propagate
the original exception.

See gh-28669

Co-authored-by: Christoph Mies <chr.mi@web.de>
2022-06-23 09:01:39 +02:00
Sam Brannen
26df4580b3 Revise internals of LoggingCacheErrorHandler
Since LoggingCacheErrorHandler was only recently introduced in 5.3.16,
we have decided to completely revise its internals (protected API) in
5.3.x while retaining the current public API.

Specifically, this commit:

- introduces protected getLogger() and isLogStackTraces() methods to
  improve extensibility

- revises logCacheError() to accept a Supplier<String> for lazy
  resolution of error messages

Closes gh-28672
See gh-28670, gh-28648
2022-06-21 16:13:55 +02:00
Vedran Pavic
57208bf47a Simplify LoggingCacheErrorHandlerTests
See gh-28648
2022-06-21 14:40:09 +02:00
Sam Brannen
8b34558284 Polish LoggingCacheErrorHandler 2022-06-21 14:07:39 +02:00
Vedran Pavic
dbe8f200a9 Simplify creation of LoggingCacheErrorHandler with logged stacktrace
At present, creating a LoggingCacheErrorHandler that logs stack traces
also requires supplying the logger to be used. This might be
inconvenient for some users, as it requires usage of the Commons
Logging API.

This commit simplifies creation of such as LoggingCacheErrorHandler
instance by adding a constructor that only accepts a boolean flag
indicating whether to log stack traces.

Closes gh-28670
2022-06-21 13:50:10 +02:00
Sam Brannen
ea4d9a20ac Upgrade to Hamcrest 2.2 2022-06-21 13:48:02 +02:00
Sam Brannen
e19e9757d4 Polishing 2022-06-20 15:19:02 +02:00
Jerome Prinet
2473e956ff Update Gradle Enterprise plugin
Closes gh-28661
2022-06-20 11:40:43 +02:00
Sébastien Deleuze
854307d8d8 Document that Kotlin inline classes are not supported
Closes gh-28642
2022-06-17 12:34:58 +02:00
Sébastien Deleuze
3401359bdf Refine @Required Kotlin documentation
Refine @Required Kotlin documentation to use
annotation use site targets.

Closes gh-28630
2022-06-17 12:25:52 +02:00