You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2010/02/22 13:41:57 UTC
[classlib] URLConnectionTest
I was looking at the URLConnectionTest recently for a JIRA and I was
wondering about this code:
public void test_getOutputStream() throws Exception {
int port = Support_Jetty.startDefaultServlet();
try {
...
} finally {
Support_Jetty.startDefaultServlet();
}
}
I'd have expected the finally clause to stop the servlet? I'd probably
have changed this but, although Support_Jetty.startDefaultServlet() is
public, the equivalent stop method is private? This seems a little odd.
Regards,
Mark.
Re: [classlib] URLConnectionTest
Posted by Sean Qiu <se...@gmail.com>.
Stand by you.
Best Regards
Sean, Xiao Xia Qiu
2010/2/22 Mark Hindess <ma...@googlemail.com>
>
> I was looking at the URLConnectionTest recently for a JIRA and I was
> wondering about this code:
>
> public void test_getOutputStream() throws Exception {
> int port = Support_Jetty.startDefaultServlet();
> try {
> ...
> } finally {
> Support_Jetty.startDefaultServlet();
> }
> }
>
> I'd have expected the finally clause to stop the servlet? I'd probably
> have changed this but, although Support_Jetty.startDefaultServlet() is
> public, the equivalent stop method is private? This seems a little odd.
>
> Regards,
> Mark.
>
>
>
>