Overview
UrlResource constructors throw checked exceptions which makes it difficult to use them in java.util.Stream and java.util.Optional APIs or other scenarios when a checked IOException is undesirable.
Proposal
To support such use cases, we should introduce factory methods in UrlResource that throw UncheckedIOException, initially for the constructor variants that accept a URI or String.
Related Issues
-
21515