RFR: 8235459: HttpRequest.BodyPublishers#ofFile(Path) assumes the default file system

Julia Boes julia.boes at oracle.com
Thu Mar 5 13:50:55 UTC 2020


Hi,

Please see this fix that adds support for non-default file systems to 
the HttpClient. More specifically, the change is in 
RequestPublishers.FilePublisher where an UnsupportedOperationException 
is thrown if a java.io.File cannot be obtained. The exception is now 
caught and a function is used to obtain an InputStream with a privileged 
scope based on the captured AccessControlContext.

Bug: https://bugs.openjdk.java.net/browse/JDK-8235459

CSR: https://bugs.openjdk.java.net/browse/JDK-8240526

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8235459/webrev.01/

Tests were run with repeat 100 cross-platform. A similar change to the 
receiving side is currently work in progress.

Regards,

Julia





More information about the net-dev mailing list