RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v10]

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Mon Feb 15 19:47:01 UTC 2021


On Mon, 15 Feb 2021 19:23:16 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 from MimeLauncher
>
> src/java.management/share/classes/javax/management/loading/MLet.java line 1149:
> 
>> 1147:                      file.deleteOnExit();
>> 1148:                      Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
>> 1149:                      if (file.exists()) {
> 
> You might have missed the comment from a previous iteration. The files.exists() check goes away when Files.copy succeeds.

You are right. Fixed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1853



More information about the security-dev mailing list