harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Strigun (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-411) InputStreamReader should not thrown exception if bytes sequence is incomplete
Date Tue, 25 Apr 2006 15:24:06 GMT
InputStreamReader should not thrown exception if bytes sequence is incomplete
-----------------------------------------------------------------------------

         Key: HARMONY-411
         URL: http://issues.apache.org/jira/browse/HARMONY-411
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Vladimir Strigun
    Priority: Minor


Harmony implementation of method read() throws IOException if bytes sequence is incomplete
in current charset. RI implementation replace malfromed input  with default replacement.

The following test failed on Harmony classlib (java.io.IOException: CoderResult[Malformed-input
error with erroneous input length 2]):
	public void testRead() throws Exception {
		InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(new byte[] {-32,
-96}), "UTF-8");
		assertTrue("read() return incorrect value", isr.read()==65533);
	}

I will attach testcase and patch soon.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message