natPlainSocketImplWin32.cc: Updated copyright.

* gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
	(read): Handle count == 0 case.

Co-Authored-By: David Daney <ddaney@avtrex.com>

From-SVN: r106894
This commit is contained in:
Mohan Embar 2005-11-14 17:15:18 +00:00 committed by Mohan Embar
parent f16fe45f32
commit 99b8b611f5
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,9 @@
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

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2003 Free Software Foundation
/* Copyright (C) 2003, 2004, 2005 Free Software Foundation
This file is part of libgcj.
@ -491,6 +491,11 @@ jint
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;