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-1198) [classlib][rmi] LogStream.setOutputStream(null) expected NPE
Date Tue, 15 Aug 2006 13:32:13 GMT
[classlib][rmi] LogStream.setOutputStream(null) expected NPE
------------------------------------------------------------

                 Key: HARMONY-1198
                 URL: http://issues.apache.org/jira/browse/HARMONY-1198
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


Harmony implementation of LogStream.setOutputStream() doesn't throw NPE if parameter is null.

================= Spec ==================
Nothing about exceptions

=================== Test =================

import java.rmi.server.*;
import java.io.*;

public class bug9407 {
    public static void main(String [] args) {
        try {
            LogStream ls = LogStream.log("proba");
            System.out.println("LogStream: "+ls);
            ls.setOutputStream(null);
            System.out.println("Test failed");
        } catch (NullPointerException e) {
            System.out.println("Test passed: " + e);
        } catch (Throwable e) {
            System.out.println("Test failed: unexpected error");
            e.printStackTrace();
        }
    }
}

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

RI
LogStream: proba
Test passed: java.lang.NullPointerException

Harmony
LogStream: LogStream[proba]
Test failed


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