* gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
(read): Handle count == 0 case.
Co-Authored-By: David Daney <ddaney@avtrex.com>
From-SVN: r106894
+2005-11-14 Mohan Embar <gnustuff@thisiscool.com>
+ David Daney <ddaney@avtrex.com>
+
+ * gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
+ (read): Handle count == 0 case.
+
2005-11-09 Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jacks/jacks.xfail (non-jls-zip-2): Now
-/* Copyright (C) 2003 Free Software Foundation
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation
This file is part of libgcj.
gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer,
jint offset, jint count)
{
+ // If zero bytes were requested, short circuit so that recv
+ // doesn't signal EOF.
+ if (count == 0)
+ return 0;
+
if (! buffer)
throw new ::java::lang::NullPointerException;