This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
PR 3426 fix
- To: java-patches at gcc dot gnu dot org
- Subject: PR 3426 fix
- From: Tony Kimball <alk at pobox dot com>
- Date: Tue, 17 Jul 2001 01:10:13 -0500
- Reply-To: alk at pobox dot com
The patch (already applied now) in
http://gcc.gnu.org/ml/java-patches/2001-q3/msg00060.html
could use a little more tidying up:
if (r == (size_t) -1)
{
// Incomplete character.
if (errno == EINVAL)
return 0;
- throw new java::io::CharConversionException ();
+ if (errno != E2BIG)
+ throw new java::io::CharConversionException ();
}
This handles the case of a BufferedInputStream being
converted to UCS-2 by an InputStreamReader using a workspace
smaller than the input buffer.