harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-6570) [classlib][luni] BufferedOutputStream.write throws IOE
Date Fri, 09 Jul 2010 04:31:49 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Regis Xu reassigned HARMONY-6570:
---------------------------------

    Assignee: Regis Xu

> [classlib][luni] BufferedOutputStream.write throws IOE
> ------------------------------------------------------
>
>                 Key: HARMONY-6570
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6570
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M14
>         Environment: Ubuntu 10.04, x86_32 
>            Reporter: Xiao Shu
>            Assignee: Regis Xu
>             Fix For: 5.0M15
>
>         Attachments: jira6570.diff
>
>
> while writing a null array after closing the stream  it should throw Null pointer exception.
         
> But it throws IO Exception
> Error output:
> ------------
> java.io.IOException: Stream is closed
>         at java.io.BufferedOutputStream.write(BufferedOutputStream.java:130)
>         at IoStream.main(IoStream.java:10)
> recreate it using the below testcase.
> import java.io.*;		
> public class Test{
>         public static void main(String [] args){
>                 try{
>                         BufferedOutputStream out =  new BufferedOutputStream(new FileOutputStream("out.txt"));
                       
>                         out.close();                        
>                         out.write(null,0,1);
>                         out.close();
>                 }catch(NullPointerException npe){                         
>                         System.out.println("TEST PASSED");
>                 }
>                 catch(IOException e ){
>                         e.printStackTrace();
>                 }
>                 catch(Exception e ){
>                         e.printStackTrace();
>                 }
>         }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message