@Override @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public String getServletContextName() { if (SecurityUtil.isPackageProtectionEnabled()) { return (String) doPrivileged("getServletContextName", null); } else { return context.getServletContextName(); } }