RFR: 8237470: HttpResponse.BodySubscriber::ofFile throws UOE with non-default file systems
Daniel Fuchs
daniel.fuchs at oracle.com
Wed May 27 17:06:38 UTC 2020
Looks good to me Julia!
best regards,
-- daniel
On 27/05/2020 10:00, Julia Boes wrote:
> Hi,
>
> We recently added support for non-default file systems to the HttpClient
> on the sending side. This fix expands the support to the receiving side.
>
> More specifically, the change is in ResponseBodyHandlers.PathBodyHandler
> and ResponseSubscribers.PathSubscriber. In both cases, an
> UnsupportedOperationException is now caught if a java.io.File cannot be
> obtained and an AccessControlContext is captured to open a FileChannel
> with a privileged scope.
>
> ResponseBodyHandlers.FileDownloadBodyHandler is changed to consistently
> throw IllegalArgumentException if a path of a non-default file system is
> passed.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8237470
>
> CSR (draft): https://bugs.openjdk.java.net/browse/JDK-8245770
>
> Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8237470/webrev.00/
>
> Tests were run with repeat 50 cross-platform.
>
> Regards,
>
> Julia
More information about the net-dev
mailing list