This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PR 3426 fix



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]