You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/16 05:09:15 UTC

[jira] Assigned: (HARMONY-1195) [classlib][io] PrintStream(OutputStream, boolean, String) throws IAE while RI throws NPE

     [ http://issues.apache.org/jira/browse/HARMONY-1195?page=all ]

Paulex Yang reassigned HARMONY-1195:
------------------------------------

    Assignee: Paulex Yang

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