mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -305,7 +305,15 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
{
|
||||
// load from classpath
|
||||
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)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to load included script classpath resource: " + resource);
|
||||
|
Reference in New Issue
Block a user