Create UrlResource factory methods that throw unchecked exceptions #28501
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Overview
UrlResource
constructors throw checked exceptions which makes it difficult to use them injava.util.Stream
andjava.util.Optional
APIs or other scenarios when a checkedIOException
is undesirable.Proposal
To support such use cases, we should introduce factory methods in
UrlResource
that throwUncheckedIOException
, initially for the constructor variants that accept aURI
orString
.Related Issues
The text was updated successfully, but these errors were encountered: