harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1195) [classlib][io] PrintStream(OutputStream, boolean, String) throws IAE while RI throws NPE
Date Mon, 21 Aug 2006 11:38:19 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1195?page=comments#action_12429397 ] 
            
Denis Kishenko commented on HARMONY-1195:
-----------------------------------------

Verified

> [classlib][io] PrintStream(OutputStream, boolean, String) throws IAE while RI throws
NPE
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1195
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1195
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Denis Kishenko
>         Assigned To: Paulex Yang
>         Attachments: 1195-PrintStream.patch
>
>
> Harmony implementation of PrintStream(OutputStream, boolean, String) throws IAE if last
parameter is null while RI throws NPE
> ======================== Test ======================
> import java.io.FileOutputStream;
> import java.io.ObjectOutputStream;
> import java.io.IOException;
> import java.io.PrintStream;
> public class bug9401 {
>     public static void main(String args[]) throws IOException {
>         try
>         {
>             new PrintStream(new OOS(), true, null);
>             System.out.println("No Exception!");
>         } catch (NullPointerException e) {
>             e.printStackTrace();
>         }
>     }
> }
> class OOS extends ObjectOutputStream {
>     public OOS() throws IOException, SecurityException {
>         super();
>     }
> }
> ====================== Output ======================
> RI
> java.lang.NullPointerException: charsetName
>     at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:81)
>     at java.io.PrintStream.<init>(PrintStream.java:123)
>     at bug9401.main(bug9401.java:11)
> Harmony
> java.lang.IllegalArgumentException
>     at java.nio.charset.Charset.forNameInternal(Charset.java:439)
>     at java.nio.charset.Charset.isSupported(Charset.java:532)
>     at java.io.PrintStream.<init>(PrintStream.java:125)
>     at bug9401.main(bug9401.java:11)

-- 
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