when ServletContext.getResoucePaths() is called with as argument an existing file, a NPE is thrown:
File.listFiles() returns null for files which are not directories (per javadoc)
attachment contains
*a test case testing the example in the javadoc of ServletContext.getResourcePaths + a test that fails with a NPE
*a patch for the NPE
*a set of resources to be put under facestester/src/test/resources used by the testcase (I failed to get that in a patch format)
Hey Guy,
thank you for your patch.
I applied it localy yesterday and it worked, except that it seems that maven does not copy empty folders and so some of the tests will fail if executed by a "normal" maven call.
But I guess Jason knows how to fix that.
I suggest that we rename the resource-folder "/servletContext" to something more specific to the testcase, so it is more obvious which resources are used by which unit-tests.
Apart from that I am still not sure how to read or lets say understand the javadocs of getResourcePaths. Guy do you have any other documentation for that method besides the javadocs?
Regards,
Imre