RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Mon Feb 8 20:50:41 UTC 2021
On Mon, 8 Feb 2021 14:01:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo
>> revert changes in Apache Santuario
>
> src/java.management/share/classes/javax/management/loading/MLet.java line 1147:
>
>> 1145: .toFile();
>> 1146: file.deleteOnExit();
>> 1147: Files.copy(is, file.toPath());
>
> One thing to check here is the existing behavior when the file already exists (as Files.copy will fail if the file exists, need to specify REPLACE_EXISTING to get the semantics of the existing code).
>
> The code that follows checks if the file exists, this will always be true when Files.copy succeeds.
fixed
-------------
PR: https://git.openjdk.java.net/jdk/pull/1853
More information about the security-dev
mailing list