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

[jira] Updated: (HARMONY-1198) [classlib][rmi] LogStream.setOutputStream(null) expected NPE

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

Denis Kishenko updated HARMONY-1198:
------------------------------------

    Attachment: 1198-LogStream.patch

patch

> [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
>         Attachments: 1198-LogStream.patch
>
>
> 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