From 392cd098c5d7aa57b0a5ae934f8ee0ce9945130c Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Mon, 22 Nov 2004 20:32:56 +0000 Subject: [PATCH] 2004-11-22 Michael Koch * gnu/java/nio/SocketChannelImpl.java (read): Made check for blocking un-ambiguous. Removed wrong check for data array length. From-SVN: r91028 --- libjava/ChangeLog | 6 ++++++ libjava/gnu/java/nio/SocketChannelImpl.java | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e3ae8ec..ef3e20a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2004-11-22 Michael Koch + + * gnu/java/nio/SocketChannelImpl.java + (read): Made check for blocking un-ambiguous. + Removed wrong check for data array length. + 2004-11-21 Michael Koch * gnu/java/nio/SocketChannelImpl.java diff --git a/libjava/gnu/java/nio/SocketChannelImpl.java b/libjava/gnu/java/nio/SocketChannelImpl.java index 23db892..ff4b63c 100644 --- a/libjava/gnu/java/nio/SocketChannelImpl.java +++ b/libjava/gnu/java/nio/SocketChannelImpl.java @@ -227,12 +227,9 @@ public final class SocketChannelImpl extends SocketChannel int available = input.available(); int len = dst.capacity() - dst.position(); - if (! isBlocking() && available == 0) + if ((! isBlocking()) && available == 0) return 0; - if (len > available) - len = available; - if (dst.hasArray()) { offset = dst.arrayOffset() + dst.position(); -- 2.7.4