[Geoserver-devel] Build in path with spaces?

What happened to having Hudson build in a path with spaces? I thought we did. I just ran into a build failure (see below) that would have been spotted earlier if Hudson built in a path with spaces.

To enhance platform support (such as GeoServer installed in Windows "Program Files"), I always build (and have my local buildbot build) in a path with spaces. This catches all sorts of bad file handling, and helps us improve the Mac/Windows user experience by using DataUtilities urlToFile/fileToURL wherever possible.

Kind regards,
Ben.

-------- Original Message --------
Subject: [Geoserver-devel] [jira] Created: (GEOS-3995) Build failure caused by unsafe URL-File conversion in KMLMapTransformer
Date: Fri, 4 Jun 2010 12:23:13 +0800
From: Ben Caradoc-Davies (JIRA) <jira@anonymised.com>
To: geoserver-devel@lists.sourceforge.net <geoserver-devel@lists.sourceforge.net>

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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Ben Caradoc-Davies ha scritto:

What happened to having Hudson build in a path with spaces? I thought we did. I just ran into a build failure (see below) that would have been spotted earlier if Hudson built in a path with spaces.

We had for a short time a Windows Hudson that was running in a path
with spaces. Unfortunately it turned out to be very unstable and
we have to shut it down. That happened many months ago.

To enhance platform support (such as GeoServer installed in Windows "Program Files"), I always build (and have my local buildbot build) in a path with spaces. This catches all sorts of bad file handling, and helps us improve the Mac/Windows user experience by using DataUtilities urlToFile/fileToURL wherever possible.

Is there anyone able to stand up a Hudson build server on Windows
again? And have it work in a path with spaces?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On 04/06/10 14:17, Andrea Aime wrote:

Is there anyone able to stand up a Hudson build server on Windows
again? And have it work in a path with spaces?

I thought someone had a Hudson building in a paths with spaces under Linux. Perhaps it was Christian Mueller's Hudson? I thought it was OpenGeo. Would it be hard to change OpenGeo's Hudson to build in a path with spaces?

Even a path with spaces under Linux catches 90% of my bungled File<->URL conversions. It won't catch problems with Windows shares or Mac Java 5, but it does help.

Kind regards,

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre