4445464748495051525354
{ return new ServletSessionImpl((HttpSession) session); } else if (session instanceof PortletSession) { return new PortletSessionImpl((PortletSession) session); } else { throw new RuntimeException("Unknown type of session"); }