SWF-998 FlowDefinitionResourceFactory.getFlowId does not remove the classpath scheme if the resource implements ContextResource

This commit is contained in:
Scott Andrews
2008-12-16 22:15:20 +00:00
parent 7759789323
commit 8166ef71e1

View File

@@ -193,18 +193,15 @@ public class FlowDefinitionResourceFactory {
if (basePath == null) {
return getFlowIdFromFileName(flowResource);
}
String basePath = this.basePath;
String basePath = removeClasspathScheme(this.basePath);
String filePath;
if (flowResource instanceof ContextResource) {
filePath = ((ContextResource) flowResource).getPathWithinContext();
} else if (flowResource instanceof ClassPathResource) {
basePath = removeClasspathScheme(basePath);
filePath = ((ClassPathResource) flowResource).getPath();
} else if (flowResource instanceof FileSystemResource) {
basePath = removeClasspathScheme(basePath);
filePath = truncateFilePath(((FileSystemResource) flowResource).getPath(), basePath);
} else if (flowResource instanceof UrlResource) {
basePath = removeClasspathScheme(basePath);
try {
filePath = truncateFilePath(((UrlResource) flowResource).getURL().getPath(), basePath);
} catch (IOException e) {