From a5897e40e191c19f1e9e23c66219346686ff3955 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 27 Nov 2009 18:11:34 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48287 Eclipse warnings Patch provided by sebb git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@884935 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/catalina/core/ApplicationContextFacade.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/core/ApplicationContextFacade.java b/java/org/apache/catalina/core/ApplicationContextFacade.java index 84904ab5e..7ce33cadf 100644 --- a/java/org/apache/catalina/core/ApplicationContextFacade.java +++ b/java/org/apache/catalina/core/ApplicationContextFacade.java @@ -162,7 +162,7 @@ public final class ApplicationContextFacade } } - + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public Set getResourcePaths(String path) { if (SecurityUtil.isPackageProtectionEnabled()){ return (Set)doPrivileged("getResourcePaths", @@ -246,6 +246,7 @@ public final class ApplicationContextFacade /** * @deprecated */ + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type @Deprecated public Enumeration getServlets() { if (SecurityUtil.isPackageProtectionEnabled()) { @@ -259,6 +260,7 @@ public final class ApplicationContextFacade /** * @deprecated */ + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type @Deprecated public Enumeration getServletNames() { if (SecurityUtil.isPackageProtectionEnabled()) { @@ -330,6 +332,7 @@ public final class ApplicationContextFacade } + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public Enumeration getInitParameterNames() { if (SecurityUtil.isPackageProtectionEnabled()) { return (Enumeration) doPrivileged( @@ -349,6 +352,7 @@ public final class ApplicationContextFacade } + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public Enumeration getAttributeNames() { if (SecurityUtil.isPackageProtectionEnabled()) { return (Enumeration) doPrivileged( @@ -427,7 +431,7 @@ public final class ApplicationContextFacade } } - + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public T createFilter(Class c) throws ServletException { if (SecurityUtil.isPackageProtectionEnabled()) { @@ -482,6 +486,7 @@ public final class ApplicationContextFacade } + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public T createServlet(Class c) throws ServletException { if (SecurityUtil.isPackageProtectionEnabled()) { @@ -503,6 +508,7 @@ public final class ApplicationContextFacade } + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public EnumSet getDefaultSessionTrackingModes() { if (SecurityUtil.isPackageProtectionEnabled()) { return (EnumSet) @@ -512,7 +518,7 @@ public final class ApplicationContextFacade } } - + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public EnumSet getEffectiveSessionTrackingModes() { if (SecurityUtil.isPackageProtectionEnabled()) { return (EnumSet) @@ -588,6 +594,7 @@ public final class ApplicationContextFacade @Override + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public T createListener(Class c) throws ServletException { if (SecurityUtil.isPackageProtectionEnabled()) { @@ -642,6 +649,7 @@ public final class ApplicationContextFacade @Override + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public Map getFilterRegistrations() { if (SecurityUtil.isPackageProtectionEnabled()) { return (Map) doPrivileged( @@ -664,6 +672,7 @@ public final class ApplicationContextFacade @Override + @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public Map getServletRegistrations() { if (SecurityUtil.isPackageProtectionEnabled()) { return (Map) doPrivileged( -- 2.11.0