Issue Details (XML | Word | Printable)

Key: DISPL-244
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Reporter: Anonymous
Votes: 0
Watchers: 0
Operations

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

TestAll breaks if the build path contains a space

Created: 19/Sep/05 06:56 PM   Updated: 26/Sep/05 02:56 PM
Component/s: Build/distribution
Affects Version/s: 1.1
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments: 1. Text File DisplaytagCasePatch.txt (0.9 kB)
2. Text File TestAllPatch.txt (1 kB)


Testcase included: yes


 Description  « Hide
The displaytag test suite would not run in my sandbox because its path contained a space, namely the space in Windoze's "c:\Documents and Settings" folder. TestAll.findAndStoreTestClasses would blow up with a null-pointer exception, blocking all unit-test execution and generating the following report.
Testsuite: org.displaytag.test.TestAll
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Null Test: Caused an ERROR
null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.lang.NullPointerException
at org.displaytag.test.ClassFinder.findAndStoreTestClasses(TestAll.java:180)
at org.displaytag.test.ClassFinder.<init>(TestAll.java:156)
at org.displaytag.test.TestAll.suite(TestAll.java:104)
... 7 more
See http://jira.codehaus.org/browse/DISPL-243#action_46601

The problem is the encoded space in the URL used to load the test resources, such that TestAll would attempt to look for test files in "c:\Documents%20and%20Settings"/blah/blah/blah instead of "c:\Documents and Settings\blah\blah\blah.
Attached you'll find a patch that fixes this bug by decoding the URL involved before attempting to find files in the local system.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jorge L. Barroso added a comment - 20/Sep/05 05:58 PM
Same thing happens in DisplaytagCase. See attached patch.

fabrizio giustina added a comment - 26/Sep/05 02:56 PM
fixed in cvs. Thanks, I didn't figured out yet that such error was caused by spaces in the path.