Sorry, I hadn't reviewed that patch before...
> + // non-Javadoc, see interface HttpRequestInterceptorList
> + public void addRequestInterceptor(final HttpRequestInterceptor itcp, int
> index) {
> +
> + if (itcp == null) {
> + return;
> + }
> + if (this.requestInterceptors == null) {
> + this.requestInterceptors = new ArrayList();
> + }
> +
> + if (index == Integer.MAX_VALUE) {
> + // Add last
> + this.requestInterceptors.add(this.requestInterceptors.size() -
> 1, itcp);
> + } else {
> + // Insert at preferred index
> + this.requestInterceptors.add(index, itcp);
> + }
> + }
This does leave room for IndexOutOfRangeExceptions, which is not
what I had in mind. Can you please change that to...
if ((index < 0) || (index > this.requestInterceptors.size())
index = this.requestInterceptors.size();
this.requestInterceptors.add(index, itcp);
and likewise for the response interceptors?
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]