Issue Details (XML | Word | Printable)

Key: FACESTESTER-15
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: jasondlee
Reporter: guy_veraghtert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
facestester

NPE in FacesTesterServletContext getResourcePaths

Created: 28/Jul/09 08:59 PM   Updated: 24/Aug/09 03:11 PM
Component/s: FacesTester
Affects Version/s: 0.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive servletContextGetResourcePathPatch.zip (2 kB) 28/Jul/09 08:59 PM - guy_veraghtert


Tags:


 Description  « Hide

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)



ioss added a comment - 29/Jul/09 05:27 PM

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


jasondlee added a comment - 24/Aug/09 03:11 PM

Assigning component