Resend RFR 8231766: Files.copy/move do not honor requested compression method when copying/moving within the same zip file

Lance Andersen lance.andersen at oracle.com
Wed Oct 23 17:48:19 UTC 2019


> On Oct 22, 2019, at 5:49 PM, Lance Andersen <lance.andersen at oracle.com> wrote:
> 
>> 
>> On Oct 22, 2019, at 2:31 PM, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>> 
>> On 22/10/2019 18:09, Lance Andersen wrote:
>>> Hi all,
>>> 
>>> This is a request to review the proposed fix for 8231766 which allows for Files.copy/move to correctly use the specified compression method when copying/moving a file within the same Zip file.
>>> 
>>> The webrev can be found at:  http://cr.openjdk.java.net/~lancea/8231766/webrev.00/ <http://cr.openjdk.java.net/~lancea/8231766/webrev.00/>
>> You should be able to avoid the copy loop by changing it to is.transfer(os). It might able be a bit more readable if you rename these two to "in" and "out" but that may be just me.
>> 
> 
> Thank you Alan.  I will try the Inputstream.transferTo(OutputStream) once I am able to build again on my mac :-(

Thanks for the suggestion Alan.

Webrev updated: http://cr.openjdk.java.net/~lancea/8231766/webrev.01/index.html <http://cr.openjdk.java.net/~lancea/8231766/webrev.01/index.html>

While I have typically used 'is' for InputStream and ‘os' for OutputStream myself, I renamed them to ‘in’, ‘out’ per your suggestion.

Mach5 jdk-tier1 through idk-tier3 still continue to pass

Best
Lance
>> -Alan
> 
> <oracle_sig_logo.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
>  <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
>  <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering 
> 1 Network Drive 
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191023/94d1229f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191023/94d1229f/oracle_sig_logo.gif>


More information about the nio-dev mailing list