Hi,
David Daney wrote:
> Wolfgang Baer wrote:
>> @@ -365,6 +362,12 @@
>> int sc = response.getCode();
>> return (sc != 304 && (sc / 100) == 3);
>> }
>> + + private static boolean isError(Response response)
>> + {
>> + int sc = response.getCodeClass();
>> + return (sc == 4 || sc == 5);
>> + }
>>
>> /**
>> * Returns a connection, from the pool if necessary.
>
>
> Perhaps make isError() a member of Response (probably with default
> visibility) as it is really a property of the Response. Then you can do:
Yes, I also thought of this. Its in HTTPURLConnection because there is
already a method isRedirect(Response r). Both should be moved to Response.
> With that small change, I think this is a good patch. There does not
> seem to be a formal acceptance policy here, so I would say that if no
> one else objects within a couple of days, commit it.
Thanks for your review.
> Thanks for doing this. As you can see from my PRs, this is something
> that I was looking at and you just saved me a bunch of work.
Well, the bugs just stopped my normal work on printing support.
So I had to fix them :-)
Wolfgang