mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8303260: (fc) FileChannel::transferFrom should support position > size()
Reviewed-by: alanb
This commit is contained in:
parent
3ef834fc6f
commit
7baccd9ee2
3 changed files with 176 additions and 13 deletions
|
@ -935,8 +935,6 @@ public class FileChannelImpl
|
|||
throw new NonWritableChannelException();
|
||||
if ((position < 0) || (count < 0))
|
||||
throw new IllegalArgumentException();
|
||||
if (position > size())
|
||||
return 0;
|
||||
|
||||
// System calls supporting fast transfers might not work on files
|
||||
// which advertise zero size such as those in Linux /proc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue