Merged V3.2 to HEAD

15410: Fix for unreported issue where Sites menu "Add to favourites" wouldn't show site name
   15411: ScriptProcessors use non-caching load method for classpath-based scripts when log4j debug flag set
   15412: ALFCOM-3198 - file size misreported in Document Details

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15413 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2009-07-27 08:27:37 +00:00
parent 20b602324c
commit e7e001ed69

View File

@@ -305,7 +305,15 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
{ {
// load from classpath // load from classpath
String scriptClasspath = resource.substring(PATH_CLASSPATH.length()); String scriptClasspath = resource.substring(PATH_CLASSPATH.length());
InputStream stream = getClass().getClassLoader().getResourceAsStream(scriptClasspath); InputStream stream;
if (logger.isDebugEnabled())
{
stream = getClass().getClassLoader().getResource(scriptClasspath).openStream();
}
else
{
stream = getClass().getClassLoader().getResourceAsStream(scriptClasspath);
}
if (stream == null) if (stream == null)
{ {
throw new AlfrescoRuntimeException("Unable to load included script classpath resource: " + resource); throw new AlfrescoRuntimeException("Unable to load included script classpath resource: " + resource);