OneBusAway / onebusaway-gtfs-modules

A Java-based library for reading, writing, and transforming public transit data in the GTFS format, including database support.
Other
129 stars 106 forks source link

Fix tests when run from a directory with spaces in its path. #111

Closed kurtraschke closed 4 years ago

kurtraschke commented 5 years ago

Summary:

Tests failed if run from a directory with spaces in the path, because Class.getResource() returns a URL, and the path component of that URL, obtained with URL.getPath(), is not guaranteed to be a valid filename (e.g. spaces will be URL-encoded). However, converting the URL to an URI instance with URL.getURI() and passing that to the File constructor which accepts an URI instance will result in a valid filesystem path.

Expected behavior:

Tests pass.

sheldonabrown commented 4 years ago

Thanks @kurtraschke