Author: markt
Date: Fri Nov 27 18:11:34 2009
New Revision: 884935

URL: http://svn.apache.org/viewvc?rev=884935&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48287
Eclipse warnings
Patch provided by sebb

Modified:
    tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java

Modified: 
tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java?rev=884935&r1=884934&r2=884935&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java 
Fri Nov 27 18:11:34 2009
@@ -162,7 +162,7 @@
         }
     }
 
-
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public Set<String> getResourcePaths(String path) {
         if (SecurityUtil.isPackageProtectionEnabled()){
             return (Set<String>)doPrivileged("getResourcePaths",
@@ -246,6 +246,7 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     @Deprecated
     public Enumeration<Servlet> getServlets() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
@@ -259,6 +260,7 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     @Deprecated
     public Enumeration<String> getServletNames() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
@@ -330,6 +332,7 @@
     }
 
 
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public Enumeration<String> getInitParameterNames() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (Enumeration<String>) doPrivileged(
@@ -349,6 +352,7 @@
      }
 
 
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public Enumeration<String> getAttributeNames() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (Enumeration<String>) doPrivileged(
@@ -427,7 +431,7 @@
         }
     }
 
-
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public <T extends Filter> T createFilter(Class<T> c)
     throws ServletException {
         if (SecurityUtil.isPackageProtectionEnabled()) {
@@ -482,6 +486,7 @@
     }
 
 
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public <T extends Servlet> T createServlet(Class<T> c)
     throws ServletException {
         if (SecurityUtil.isPackageProtectionEnabled()) {
@@ -503,6 +508,7 @@
     }
     
     
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (EnumSet<SessionTrackingMode>)
@@ -512,7 +518,7 @@
         }
     }
 
-
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (EnumSet<SessionTrackingMode>)
@@ -588,6 +594,7 @@
 
 
     @Override
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public <T extends EventListener> T createListener(Class<T> c)
             throws ServletException {
         if (SecurityUtil.isPackageProtectionEnabled()) {
@@ -642,6 +649,7 @@
 
 
     @Override
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public Map<String, ? extends FilterRegistration> getFilterRegistrations() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (Map<String, ? extends FilterRegistration>) doPrivileged(
@@ -664,6 +672,7 @@
 
 
     @Override
+    @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
     public Map<String, ? extends ServletRegistration> 
getServletRegistrations() {
         if (SecurityUtil.isPackageProtectionEnabled()) {
             return (Map<String, ? extends ServletRegistration>) doPrivileged(



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to