Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.10.1
-
None
-
Mac os x 10.8.1
Java 1.7.0_07
-
Unknown
Description
In my xsl-files I have imports and includes that resides in folders a few levels up.
Ex:
<xsl:include href="../../common/myfunctions.xsl"/>
When camel starts up and tries to resolve the paths it crashes because of the current implementation in ObjectHelper.resolveUriPath(..)
Made a simple testcase that demonstrates my problem.
public void testResolveUriPath() throws Exception { assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/../")); // OK assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/../two/../")); // OK assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/")); // OK assertEquals("", ObjectHelper.resolveUriPath("./")); // OK assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/two/../../")); // Fails, gives 'xslt/one/.' assertEquals("xslt/", ObjectHelper.resolveUriPath("xslt/one/two/../.././"));// Fails, gives 'xslt/one/.' }