You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2005/10/09 22:30:14 UTC
Change in FileResourceLoader breaks test on Unix
Hi,
the recent change in the FileResourceLoader breaks the
AbsoluteFileResourceLoaderTestCase on Unix. It goes south when the FRL
strips the leading "/" off in lines 121ff. and then tries to open the
file from the existing list of paths which contains only "".
findTemplate then calls getFile("", "home/henning/scratch/velocity/core/test/absolute/absolute.vm")
and ends up doing new File("home/henning/scratch/velocity/core/test/absolute/absolute.vm") which results
in a relative path.
Either the test case must set up a paths array (using the 'path'
property containing "/" for the whole file system) or the program
logic is flawed at some point. This is probably not visible on Windows
because the absolute path does not start with a "/" (C:\foo\bar)
Best regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
4 - 8 - 15 - 16 - 23 - 42
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Change in FileResourceLoader breaks test on Unix
Posted by Will Glass-Husain <wg...@forio.com>.
Thanks - I'll work on this. Probably tomorrow.
This is why we have test cases. You're right, I checked Windows only. Glad
we all have diverse development platforms.
As a process note, when we get to a release stage maybe we can coordinate a
Linux/Windows and JDK 1.3/1.4/5.0 matrix of tests among the various
developers.
WILL
----- Original Message -----
From: "Henning P. Schmiedehausen" <hp...@intermeta.de>
Newsgroups: hometree.jakarta.velocity.dev
To: <ve...@jakarta.apache.org>
Sent: Sunday, October 09, 2005 1:30 PM
Subject: Change in FileResourceLoader breaks test on Unix
> Hi,
>
> the recent change in the FileResourceLoader breaks the
> AbsoluteFileResourceLoaderTestCase on Unix. It goes south when the FRL
> strips the leading "/" off in lines 121ff. and then tries to open the
> file from the existing list of paths which contains only "".
>
> findTemplate then calls getFile("",
> "home/henning/scratch/velocity/core/test/absolute/absolute.vm")
> and ends up doing new
> File("home/henning/scratch/velocity/core/test/absolute/absolute.vm") which
> results
> in a relative path.
>
> Either the test case must set up a paths array (using the 'path'
> property containing "/" for the whole file system) or the program
> logic is flawed at some point. This is probably not visible on Windows
> because the absolute path does not start with a "/" (C:\foo\bar)
>
> Best regards
> Henning
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
> hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
>
> RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
> Linux, Java, perl, Solaris -- Consulting, Training, Development
>
> 4 - 8 - 15 - 16 - 23 - 42
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org