Re: [jetty-user] test-jetty-servlet masks thrown exception types as of 7.6.0.RC4 (including latest release)
"Jacob Kjome" <[email protected]> Fri, 23 Mar 2012 11:32:14 -0500
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <[email protected]> |
I see the bug is fixed for jetty-7.6.3/8.1.3. Thanks for the quick work Jan! Jake On Thu, 22 Mar 2012 11:30:28 +1100  Jan Bartel <[email protected]> wrote: > Jacob, > > You're right - we're handling filter initialization exceptions > differently than servlet initialization exceptions. > > Raised: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375009 > > thanks > Jan > > On 22 March 2012 06:07, Jacob Kjome <[email protected]> wrote: >> >> No comment on this Jetty behavioral change which appears pretty clear to me >> to be a bug? >> >> Jake >> >> >> On Mon, 19 Mar 2012 17:17:39 -0500 >>  "Jacob Kjome" <[email protected]> wrote: >>> >>> >>> I'm using the Jetty Servlet Tester library to test a Filter. The >>> following test works fine in version 7.5.4.v20111024 and right up through >>> 7.6.0.RC3.... >>> >>> @Test(expected = ServletException.class) >>>    public void initMissingHttpFilterRequiredParamContainer() throws >>> Exception >>>    { >>>        final ServletTester localTester = new ServletTester(); >>>        localTester.addFilter(HttpFilter.class, "/httpfilter/arbitrary/*", >>> FilterMapping.REQUEST); >>>        localTester.setContextPath(""); >>>        localTester.start(); >>>    } >>> >>> I expect a ServletException because a required init parameter wasn't set >>> and, in such case, my filter throws a ServletException to indicate the >>> problem. >>> >>> But as of version 7.6.0.RC4 and right up through the latest >>> 7.6.2.v20120308, I get the following error.... >>> >>> >>> initMissingHttpFilterRequiredParamContainer(com.blah.servlet.HttpFilterTest): >>> Unexpected exception, expected<javax.servlet.ServletException> but >>> was<org.eclipse.jetty.util.MultiException> >>> >>> >>> It is not helpful to mask the real exception, and I certainly don't want >>> to test specifically for "org.eclipse.jetty.util.MultiException" because >>> that's not what I'm throwing and because it's Jetty-specific. >>> >>> Was this change intentional or is an oversight/bug? >>> >>> >>> Jake >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>>     http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >>  http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > >    http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email