SWF-948 Base path behavior inconsistent between flow-location and flow-location-pattern

Now appending a tailing slash, if needed, to the base path when creating a relative resource.  This works for both file system and classpath resources.
This commit is contained in:
Scott Andrews
2008-11-10 19:48:48 +00:00
parent 23e1a97297
commit fac2079486

View File

@@ -107,6 +107,11 @@ public class FlowDefinitionResourceFactory {
resource = resourceLoader.getResource(path);
} else {
try {
String basePath = this.basePath;
if (!basePath.endsWith("/")) {
// the basePath must end with a slash to create a relative resource
basePath = basePath + "/";
}
resource = resourceLoader.getResource(basePath).createRelative(path);
} catch (IOException e) {
throw new IllegalStateException("The base path cannot be resolved from '" + basePath + "': "