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] Created: (HARMONY-1195) [classlib][io] PrintStream(OutputStream, boolean, String) throws IAE while RI throws NPE
Date Tue, 15 Aug 2006 13:20:13 GMT
[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

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 {
            new PrintStream(new OOS(), true, null);
            System.out.println("No Exception!");
        } catch (NullPointerException e) {

class OOS extends ObjectOutputStream {
    public OOS() throws IOException, SecurityException {

====================== Output ======================

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)

    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


View raw message