From b8914ce0fd9519b70e2357183d9aac5f9b72877f Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 5 Nov 2003 11:48:57 +0000 Subject: [PATCH] Added separate constructor that allows for a parent class loader argument. Use the standard parent class loader in the old (single argument) constructor. --- src/helma/main/launcher/FilteredClassLoader.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/helma/main/launcher/FilteredClassLoader.java b/src/helma/main/launcher/FilteredClassLoader.java index 6592e232..09c67cd6 100644 --- a/src/helma/main/launcher/FilteredClassLoader.java +++ b/src/helma/main/launcher/FilteredClassLoader.java @@ -30,7 +30,17 @@ public class FilteredClassLoader extends URLClassLoader { * so that they can load classes from jar files in the app directories. */ public FilteredClassLoader(URL[] urls) { - super(urls, null); + super(urls); + } + + /** + * Create a server wide class loader that doesn't see the scripting engine(s) + * embedded in helma.jar. These files should be loaded by the per-application + * class loaders so that special security policies can be applied to them and + * so that they can load classes from jar files in the app directories. + */ + public FilteredClassLoader(URL[] urls, ClassLoader parent) { + super(urls, parent); } /**