From: <do...@hy...> - 2008-01-17 04:11:15
|
Author: dougm Date: 2008-01-16 20:11:09 -0800 (Wed, 16 Jan 2008) New Revision: 7586 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=7586 Modified: trunk/src/org/hyperic/util/PluginLoader.java Log: Add option to skip escaping of spaces Modified: trunk/src/org/hyperic/util/PluginLoader.java =================================================================== --- trunk/src/org/hyperic/util/PluginLoader.java 2008-01-17 03:53:05 UTC (rev 7585) +++ trunk/src/org/hyperic/util/PluginLoader.java 2008-01-17 04:11:09 UTC (rev 7586) @@ -42,6 +42,9 @@ public class PluginLoader extends URLClassLoader { + //XXX WAS 6.1 seems to have an issue with %20 + private static final boolean ESCAPE_SPACES = + !"false".equals(System.getProperty("PluginLoader.ESCAPE_SPACES")); private static final ClassLoader defaultClassLoader = getClassLoader(); private Map addedURLs = new HashMap(); private ClassLoader previousClassLoader = null; @@ -49,7 +52,10 @@ private String pluginClassName = null; private static String toFileURL(String file) { - return "file:" + StringUtil.replace(file, " ", "%20"); //escape spaces + if (ESCAPE_SPACES) { + file = StringUtil.replace(file, " ", "%20"); + } + return "file:" + file; } private static URL toJarURL(String file) |