test/jdk/java/io/InputStream/ReadParams.java
changeset 48461 6a1c3a5e04f3
parent 47216 71c04702a3d5
equal deleted inserted replaced
48460:bdbbf56c302e 48461:6a1c3a5e04f3
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4008296 4008293 4190090 4193729
    26  * @bug 4008296 4008293 4190090 4193729 4358774
    27  * @summary Check for correct handling of parameters to
    27  * @summary Check for correct handling of parameters to
    28  *          XXXXInputStream.read(b, off, len).
    28  *          XXXXInputStream.read(b, off, len).
    29  *
    29  *
    30  */
    30  */
    31 
    31 
   195             (new ByteArrayInputStream(bos.toByteArray()));
   195             (new ByteArrayInputStream(bos.toByteArray()));
   196         doTest(ifs);
   196         doTest(ifs);
   197         doTest1(ifs);
   197         doTest1(ifs);
   198         ifs.close();
   198         ifs.close();
   199 
   199 
       
   200         InputStream nis = InputStream.nullInputStream();
       
   201         doTest(nis);
       
   202         doTest1(nis);
       
   203         nis.close();
       
   204 
   200         /* cleanup */
   205         /* cleanup */
   201         fn.delete();
   206         fn.delete();
   202     }
   207     }
   203 }
   208 }
   204 
   209