@Override
 public ServletRegistration.Dynamic addServlet(String servletName, String className) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (ServletRegistration.Dynamic)
         doPrivileged("addServlet", new Object[] {servletName, className});
   } else {
     return context.addServlet(servletName, className);
   }
 }
 /*
  * Adds the servlet with the given name and class name to this
  * servlet context.
  */
 @Override
 @SuppressWarnings("unchecked") // doPrivileged() returns the correct type
 public ServletRegistration.Dynamic addServlet(String servletName, String className) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (ServletRegistration.Dynamic)
         doPrivileged("addServlet", new Object[] {servletName, className});
   } else {
     return context.addServlet(servletName, className);
   }
 }
 @Override
 public ServletRegistration.Dynamic addServlet(
     String servletName, Class<? extends Servlet> servletClass) {
   if (SecurityUtil.isPackageProtectionEnabled()) {
     return (ServletRegistration.Dynamic)
         doPrivileged("addServlet", new Object[] {servletName, servletClass.getName()});
   } else {
     return context.addServlet(servletName, servletClass);
   }
 }