public Object instantiateScript(InputStream stream, String name) throws IOException
{
GroovyClassLoader loader;
if (mapping.size() > 0)
{
JarJarClassLoader jarjarLoader = SecurityHelper.doPrivilegedAction(new PrivilegedAction<JarJarClassLoader>()
{
public JarJarClassLoader run()
{
return new JarJarClassLoader();
}
});
jarjarLoader.addMapping(mapping);
loader = jarjarLoader;
}
else
{
loader = SecurityHelper.doPrivilegedAction(new PrivilegedAction<GroovyClassLoader>()