@Override
 public ServletRegistration getServletRegistration(String servletName) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (ServletRegistration)
         doPrivileged("getServletRegistration", new Object[] {servletName});
   } else {
     return context.getServletRegistration(servletName);
   }
 }
Ejemplo n.º 2
0
 /**
  * Gets the ServletRegistration corresponding to the servlet with the given <tt>servletName</tt>.
  */
 @Override
 @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
 public ServletRegistration getServletRegistration(String servletName) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (ServletRegistration)
         doPrivileged("getServletRegistration", new Object[] {servletName});
   } else {
     return context.getServletRegistration(servletName);
   }
 }