renamed as per review

This commit is contained in:
gregw 2024-03-27 17:35:01 +01:00
parent ddc6dc28d3
commit ce085027d2
8 changed files with 41 additions and 41 deletions

View File

@ -2,7 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addProtectedClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addProtectedClasses">
<Arg><Ref refid="Server"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
@ -11,7 +11,7 @@
</Arg>
</Call>
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addHiddenClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addHiddenClasses">
<Arg><Ref refid="Server"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">

View File

@ -2,7 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addProtectedClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addProtectedClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
@ -11,7 +11,7 @@
</Arg>
</Call>
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addHiddenClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addHiddenClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">

View File

@ -38,7 +38,7 @@ import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionBindingListener;
import jakarta.servlet.http.HttpSessionIdListener;
import jakarta.servlet.http.HttpSessionListener;
import org.eclipse.jetty.ee.WebappClassLoading;
import org.eclipse.jetty.ee.WebAppClassLoading;
import org.eclipse.jetty.ee10.servlet.ErrorHandler;
import org.eclipse.jetty.ee10.servlet.ErrorPageErrorHandler;
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
@ -85,25 +85,25 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
static final Logger LOG = LoggerFactory.getLogger(WebAppContext.class);
public static final String WEB_DEFAULTS_XML = "org/eclipse/jetty/ee10/webapp/webdefault-ee10.xml";
public static final String SERVER_SYS_CLASSES = WebappClassLoading.PROTECTED_CLASSES_ATTRIBUTE;
public static final String SERVER_SRV_CLASSES = WebappClassLoading.HIDDEN_CLASSES_ATTRIBUTE;
public static final String SERVER_SYS_CLASSES = WebAppClassLoading.PROTECTED_CLASSES_ATTRIBUTE;
public static final String SERVER_SRV_CLASSES = WebAppClassLoading.HIDDEN_CLASSES_ATTRIBUTE;
private static final String[] __dftProtectedTargets = {"/WEB-INF", "/META-INF"};
/**
* @deprecated use {@link WebappClassLoading#DEFAULT_PROTECTED_CLASSES}
* @deprecated use {@link WebAppClassLoading#DEFAULT_PROTECTED_CLASSES}
*/
@Deprecated
public static final ClassMatcher __dftSystemClasses = WebappClassLoading.DEFAULT_PROTECTED_CLASSES;
public static final ClassMatcher __dftSystemClasses = WebAppClassLoading.DEFAULT_PROTECTED_CLASSES;
/**
* @deprecated use {@link WebappClassLoading#DEFAULT_HIDDEN_CLASSES}
* @deprecated use {@link WebAppClassLoading#DEFAULT_HIDDEN_CLASSES}
*/
@Deprecated
public static final ClassMatcher __dftServerClasses = WebappClassLoading.DEFAULT_HIDDEN_CLASSES;
public static final ClassMatcher __dftServerClasses = WebAppClassLoading.DEFAULT_HIDDEN_CLASSES;
private final ClassMatcher _protectedClasses = new ClassMatcher(WebappClassLoading.getProtectedClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _hiddenClasses = new ClassMatcher(WebappClassLoading.getHiddenClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _protectedClasses = new ClassMatcher(WebAppClassLoading.getProtectedClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _hiddenClasses = new ClassMatcher(WebAppClassLoading.getHiddenClasses(ServletContextHandler.ENVIRONMENT));
private Configurations _configurations;
private String _defaultsDescriptor = WEB_DEFAULTS_XML;
@ -832,8 +832,8 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
super.setServer(server);
if (server != null)
{
_protectedClasses.add(WebappClassLoading.getProtectedClasses(server).getPatterns());
_hiddenClasses.add(WebappClassLoading.getHiddenClasses(server).getPatterns());
_protectedClasses.add(WebAppClassLoading.getProtectedClasses(server).getPatterns());
_hiddenClasses.add(WebAppClassLoading.getHiddenClasses(server).getPatterns());
}
}
@ -1511,12 +1511,12 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
* @param patterns the patterns to use
* @see #getHiddenClassMatcher()
* @see #getHiddenClasses()
* @deprecated use {@link WebappClassLoading#addProtectedClasses(Server, String...)}
* @deprecated use {@link WebAppClassLoading#addProtectedClasses(Server, String...)}
*/
@Deprecated(since = "12.0.8", forRemoval = true)
public static void addServerClasses(Server server, String... patterns)
{
WebappClassLoading.addHiddenClasses(server, patterns);
WebAppClassLoading.addHiddenClasses(server, patterns);
}
/**
@ -1525,11 +1525,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
* @param patterns the patterns to use
* @see #getProtectedClassMatcher()
* @see #getProtectedClasses()
* @deprecated use {@link WebappClassLoading#addHiddenClasses(Server, String...)}
* @deprecated use {@link WebAppClassLoading#addHiddenClasses(Server, String...)}
*/
@Deprecated(since = "12.0.8", forRemoval = true)
public static void addSystemClasses(Server server, String... patterns)
{
WebappClassLoading.addProtectedClasses(server, patterns);
WebAppClassLoading.addProtectedClasses(server, patterns);
}
}

View File

@ -36,7 +36,7 @@ import jakarta.servlet.GenericServlet;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import org.eclipse.jetty.ee.WebappClassLoading;
import org.eclipse.jetty.ee.WebAppClassLoading;
import org.eclipse.jetty.ee10.servlet.ErrorPageErrorHandler;
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
import org.eclipse.jetty.http.HttpStatus;
@ -963,7 +963,7 @@ public class WebAppContextTest
List<String> serverClasses = List.of(context.getHiddenClasses());
assertThat("Should have environment specific test pattern", serverClasses, hasItem(testPattern));
assertThat("Should have pattern from JaasConfiguration", serverClasses, hasItem("-org.eclipse.jetty.security.jaas."));
for (String defaultServerClass: WebappClassLoading.DEFAULT_HIDDEN_CLASSES)
for (String defaultServerClass: WebAppClassLoading.DEFAULT_HIDDEN_CLASSES)
assertThat("Should have default patterns", serverClasses, hasItem(defaultServerClass));
}
@ -990,7 +990,7 @@ public class WebAppContextTest
List<String> systemClasses = List.of(context.getProtectedClasses());
assertThat("Should have environment specific test pattern", systemClasses, hasItem(testPattern));
assertThat("Should have pattern from JaasConfiguration", systemClasses, hasItem("org.eclipse.jetty.security.jaas."));
for (String defaultSystemClass: WebappClassLoading.DEFAULT_PROTECTED_CLASSES)
for (String defaultSystemClass: WebAppClassLoading.DEFAULT_PROTECTED_CLASSES)
assertThat("Should have default patterns", systemClasses, hasItem(defaultSystemClass));
}
}

View File

@ -2,7 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addProtectedClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addProtectedClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
@ -11,7 +11,7 @@
</Arg>
</Call>
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addHiddenClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addHiddenClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">

View File

@ -2,7 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addProtectedClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addProtectedClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
@ -11,7 +11,7 @@
</Arg>
</Call>
<Call class="org.eclipse.jetty.ee.WebappClassLoading" name="addHiddenClasses">
<Call class="org.eclipse.jetty.ee.WebAppClassLoading" name="addHiddenClasses">
<Arg><Ref refid="Environment"/></Arg>
<Arg>
<Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">

View File

@ -40,7 +40,7 @@ import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionBindingListener;
import jakarta.servlet.http.HttpSessionIdListener;
import jakarta.servlet.http.HttpSessionListener;
import org.eclipse.jetty.ee.WebappClassLoading;
import org.eclipse.jetty.ee.WebAppClassLoading;
import org.eclipse.jetty.ee9.nested.ContextHandler;
import org.eclipse.jetty.ee9.nested.ErrorHandler;
import org.eclipse.jetty.ee9.nested.HandlerWrapper;
@ -91,25 +91,25 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
public static final String WEB_DEFAULTS_XML = "org/eclipse/jetty/ee9/webapp/webdefault-ee9.xml";
public static final String ERROR_PAGE = "org.eclipse.jetty.server.error_page";
public static final String SERVER_SYS_CLASSES = WebappClassLoading.PROTECTED_CLASSES_ATTRIBUTE;
public static final String SERVER_SRV_CLASSES = WebappClassLoading.HIDDEN_CLASSES_ATTRIBUTE;
public static final String SERVER_SYS_CLASSES = WebAppClassLoading.PROTECTED_CLASSES_ATTRIBUTE;
public static final String SERVER_SRV_CLASSES = WebAppClassLoading.HIDDEN_CLASSES_ATTRIBUTE;
private static final String[] __dftProtectedTargets = {"/WEB-INF", "/META-INF"};
/**
* @deprecated use {@link WebappClassLoading#DEFAULT_PROTECTED_CLASSES}
* @deprecated use {@link WebAppClassLoading#DEFAULT_PROTECTED_CLASSES}
*/
@Deprecated
public static final ClassMatcher __dftSystemClasses = WebappClassLoading.DEFAULT_PROTECTED_CLASSES;
public static final ClassMatcher __dftSystemClasses = WebAppClassLoading.DEFAULT_PROTECTED_CLASSES;
/**
* @deprecated use {@link WebappClassLoading#DEFAULT_HIDDEN_CLASSES}
* @deprecated use {@link WebAppClassLoading#DEFAULT_HIDDEN_CLASSES}
*/
@Deprecated
public static final ClassMatcher __dftServerClasses = WebappClassLoading.DEFAULT_HIDDEN_CLASSES;
public static final ClassMatcher __dftServerClasses = WebAppClassLoading.DEFAULT_HIDDEN_CLASSES;
private final ClassMatcher _systemClasses = new ClassMatcher(WebappClassLoading.getProtectedClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _serverClasses = new ClassMatcher(WebappClassLoading.getHiddenClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _systemClasses = new ClassMatcher(WebAppClassLoading.getProtectedClasses(ServletContextHandler.ENVIRONMENT));
private final ClassMatcher _serverClasses = new ClassMatcher(WebAppClassLoading.getHiddenClasses(ServletContextHandler.ENVIRONMENT));
private Configurations _configurations;
private String _defaultsDescriptor = WEB_DEFAULTS_XML;
@ -772,8 +772,8 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
super.setServer(server);
if (server != null)
{
_systemClasses.add(WebappClassLoading.getProtectedClasses(server).getPatterns());
_serverClasses.add(WebappClassLoading.getHiddenClasses(server).getPatterns());
_systemClasses.add(WebAppClassLoading.getProtectedClasses(server).getPatterns());
_serverClasses.add(WebAppClassLoading.getHiddenClasses(server).getPatterns());
}
}
@ -1475,12 +1475,12 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
* @param patterns the patterns to use
* @see #getServerClassMatcher()
* @see #getServerClasses()
* @deprecated use {@link WebappClassLoading#addProtectedClasses(Server, String...)}
* @deprecated use {@link WebAppClassLoading#addProtectedClasses(Server, String...)}
*/
@Deprecated(since = "12.0.8", forRemoval = true)
public static void addServerClasses(Server server, String... patterns)
{
WebappClassLoading.addHiddenClasses(server, patterns);
WebAppClassLoading.addHiddenClasses(server, patterns);
}
/**
@ -1489,11 +1489,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
* @param patterns the patterns to use
* @see #getSystemClassMatcher()
* @see #getSystemClasses()
* @deprecated use {@link WebappClassLoading#addHiddenClasses(Server, String...)}
* @deprecated use {@link WebAppClassLoading#addHiddenClasses(Server, String...)}
*/
@Deprecated(since = "12.0.8", forRemoval = true)
public static void addSystemClasses(Server server, String... patterns)
{
WebappClassLoading.addProtectedClasses(server, patterns);
WebAppClassLoading.addProtectedClasses(server, patterns);
}
}