Build failure caused by unsafe URL-File conversion in KMLMapTransformer
-----------------------------------------------------------------------
Key: GEOS-3995
URL: http://jira.codehaus.org/browse/GEOS-3995
Project: GeoServer
Issue Type: Bug
Components: WMS
Affects Versions: 2.0.x, 2.1.x
Reporter: Ben Caradoc-Davies
Assignee: Andrea Aime
Priority: Blocker
Fix For: 2.0.3, 2.0.x, 2.1.x
The new behaviour and expanded unit test coverage introduced in r14469 by GEOS-3994 causes the build to fail in a path with spaces. (The broken code existed before; these changes in GEOS-3994 found it.)
While determining the location of a symboliser graphic, we have:
{code}
File file = new File(graphic.getLocation().getFile());
{code}
This is unsafe because it does not unescape URL encoded characters such as spaces. If the graphic is present in a path with spaces, the resulting file does not exist. The solution is to replace this with:
{code}
File file = DataUtilities.urlToFile(graphic.getLocation());
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira