Ejemplo n.º 1
0
 /** Adds the filter with the given name and class name to this servlet context. */
 @Override
 @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
 public FilterRegistration.Dynamic addFilter(String filterName, String className) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (FilterRegistration.Dynamic)
         doPrivileged("addFilter", new Object[] {filterName, className});
   } else {
     return context.addFilter(filterName, className);
   }
 }