harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1849) [classlib][nio charset] java.nio.charset.CharsetEncoder.flush() throws unexpected IllegalArgumentException
Date Wed, 05 Dec 2007 20:12:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikhail Markov closed HARMONY-1849.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Mikhail Markov

> [classlib][nio charset] java.nio.charset.CharsetEncoder.flush() throws unexpected IllegalArgumentException
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1849
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1849
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>            Assignee: Mikhail Markov
>            Priority: Minor
>         Attachments: H-1849-OutputStreamWriterTest.patch, Update-H-1849-OutputStreamWriterTest.patch
>
>
> Description:
> Unexpected IllegalArgumentException: "The length must be positive" was thrown on closing
OutputStreamWriter object.
> RI works fine without any exceptions.
> import junit.framework.TestCase;
> import java.io.*;
>    public class test extends TestCase{    
>        public void testclose() throws IOException { 
>            OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("file"));
                  
>            try {
>                 // write a surrogate pair char, then, write a char 0x0001 in order
>                 // to create a malformed surrogate element, expect nothing since specification
>                 // says the behavior is unspecified.
>                osw.write(0xD800); 
>                osw.write(1);
>             } catch (Throwable e) {
>                 //expected
>             } finally {                
>                  osw.close();
>             }        
>     }
> }
> HARMONY output:
> ==============
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> 1) testclose(test)java.lang.IllegalArgumentException: The length must be positive.
>         at java.nio.charset.CoderResult.malformedForLength(CoderResult.java:156)
>         at com.ibm.icu4jni.charset.CharsetEncoderICU.implFlush(Unknown Source)
>         at java.nio.charset.CharsetEncoder.flush(CharsetEncoder.java:650)
>         at java.io.OutputStreamWriter.close(OutputStreamWriter.java:150)
>         at test.testclose(test.java:16)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 
> SUN output:
> ==========
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> .
> Time: 0.01
> OK (1 test)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message