private static URL fixURL(URL jarURL)
    {
        String jarURLString = jarURL.toExternalForm();
        if (StringUtils.contains(jarURLString, ' ')) {
            jarURLString = jarURLString.replace(" ", "%20");

            try {
                return new URL(jarURLString);
            } catch (MalformedURLException e) {
                // TODO: Log something ?
            }
        }

        return jarURL;
    }
private static URL fixURL ( URL jarURL ) { String jarURLString = jarURL . toExternalForm ( ) ; if ( StringUtils . contains ( jarURLString , ' ' ) ) { jarURLString = jarURLString . replace ( " " , "%20" ) ; try { return new URL ( jarURLString ) ; } catch ( MalformedURLException e ) { } } return jarURL ; }
Workaround insane WebSphere bug (see https://jira.xwiki.org/browse/XWIKI-13898)