diff --git a/engine/src/main/java/org/camunda/bpm/container/impl/deployment/AbstractParseBpmPlatformXmlStep.java b/engine/src/main/java/org/camunda/bpm/container/impl/deployment/AbstractParseBpmPlatformXmlStep.java index a55cc78cbab..7589db127a6 100644 --- a/engine/src/main/java/org/camunda/bpm/container/impl/deployment/AbstractParseBpmPlatformXmlStep.java +++ b/engine/src/main/java/org/camunda/bpm/container/impl/deployment/AbstractParseBpmPlatformXmlStep.java @@ -215,6 +215,18 @@ public URL lookupBpmPlatformXml() { return fileLocation; } + public URL testMethod(String url) throws MalformedURLException { + Pattern pattern = Pattern.compile("^(/|[A-z]://?|A-Za-z]:\\\\).*[/|\\\\]bpm-platform\\.xml$"); + Matcher fileMatcher = pattern.matcher(url); + if (fileMatcher.matches()) { + File location = new File(url); + if (location.isAbsolute() && location.exists()) { + return location.toURI().toURL(); + } + } + return null; + } + public abstract URL getBpmPlatformXmlStream(DeploymentOperation operationContext); }