hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Make BasicHttpProcessor Lists final?
Date Sun, 15 Feb 2009 15:47:29 GMT
On 15/02/2009, sebb <sebbaz@gmail.com> wrote:
> On 15/02/2009, Oleg Kalnichevski <olegk@apache.org> wrote:
>  > sebb wrote:
>  >
>  > > On 15/02/2009, sebb <sebbaz@gmail.com> wrote:
>  > >
>  > > > On 15/02/2009, Oleg Kalnichevski <olegk@apache.org> wrote:
>  > > >  > sebb wrote:
>  > > >
>  > >
>  >
>  >  ...
>  >
>  >
>  > > I've committed a fix.
>  > >
>  > > I'm not entirely sure about the behaviour of copyInterceptors() -
>  > > previously it would only update the target if the source was non-null.
>  > > I've changed this to check for size() > 0.
>  > >
>  > > However, this means that the target may not be the same as the source
>  > > - if the source has an empty List, the target List is left untouched.
>  > >
>  > > As far as I can tell, this is the same behaviour as before, but was
>  > > that behaviour correct?
>  > >
>  > >
>  >
>  >  This looks wrong.
>  >
>  >
>  > > It won't affect existing calls to the routine since they always pass
>  > > in a newly initialised target, whose lists will be empty. But if the
>  > > (protected) method is used directly, the behaviour may not be what is
>  > > suggested by the method name.
>  > >
>  > >
>  >
>  >  Let's fix it.
>
>
> OK, I'll clear the target unconditionally.

Done; also added some Javadoc.

>  BTW, I seem to have introduced a bug - or at least I've caused a test to fail:
>
>  testGracefulShutdown(org.apache.http.impl.nio.reactor.TestDefaultIOReactorsSSL)
>   Time elapsed: 10.781 sec  <<< FAILURE!
>  junit.framework.AssertionFailedError: expected:<0> but was:<10>
>
>  I'll look at that now.

As mentioned in another thread, this was a timing issue, caused by my
system being rather busy with AV scanning.

The fixes to the class seem OK.

> >  Oleg
>  >
>  >
>  > ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>  >  For additional commands, e-mail: dev-help@hc.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message