Index: src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java =================================================================== --- src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java (revision 996441) +++ src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java (working copy) @@ -46,6 +46,8 @@ */ public class WarDeploymentListener implements ArtifactUrlTransformer { + private static final String PATH_SEPERATOR = "/"; + private static final Log LOGGER = LogFactory .getLog(WarDeploymentListener.class); @@ -80,15 +82,9 @@ int lastSlash = 0; - if ("jardir".equalsIgnoreCase(protocol)) { - lastSlash = path.lastIndexOf(File.separator); - // match the last File.seperator to - // retrieve the name of the archive - } else { - lastSlash = path.lastIndexOf(File.separator); - // match the last slash to - // retrieve the name of the archive - } + lastSlash = path.lastIndexOf(PATH_SEPERATOR); + // match the last slash to + // retrieve the name of the archive int suffixPos = path.lastIndexOf(".war"); // match the suffix so we get // rid of it for displaying