public RequestDispatcher getNamedDispatcher(String name) { if (SecurityUtil.isPackageProtectionEnabled()) { return (RequestDispatcher) doPrivileged("getNamedDispatcher", new Object[] {name}); } else { return context.getNamedDispatcher(name); } }
@Override @SuppressWarnings("unchecked") // doPrivileged() returns the correct type public RequestDispatcher getNamedDispatcher(String name) { if (SecurityUtil.isPackageProtectionEnabled()) { return (RequestDispatcher) doPrivileged("getNamedDispatcher", new Object[] {name}); } else { return context.getNamedDispatcher(name); } }