You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/04/13 18:47:06 UTC

[GitHub] [commons-io] garydgregory commented on a change in pull request #112: IO-665 ensure that passing a null InputStream results in NPE with tests

garydgregory commented on a change in pull request #112: IO-665  ensure that passing a null InputStream results in NPE with tests
URL: https://github.com/apache/commons-io/pull/112#discussion_r407647154
 
 

 ##########
 File path: src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
 ##########
 @@ -78,6 +82,26 @@ protected void _testRawNoBomInvalid(final String encoding) throws Exception {
         }
     }
 
+    @Test
+    protected void testNullFileInput() throws IOException {
+        assertThrows(NullPointerException.class, ()-> new XmlStreamReader((File)null));
 
 Review comment:
   Hi @ottobackwards 
   The spacing in "() ->" is inconsistent, it should be "() ->" everywhere.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services