Request for Review 6882594

Alan Bateman Alan.Bateman at Sun.COM
Thu Sep 17 13:18:42 PDT 2009


Christopher Hegarty -Sun Microsystems Ireland wrote:
> Max (Weijun) Wang wrote:
>> HttpURLConnection.java:
>>
>>    I think "if (authScheme.equals(BASIC))" can be written as 
>> "authScheme == BASIC", and possibly you can use switch/case in 
>> several places
>
> Thanks Max, these changes certainly make the code more readable.
>
> Updated webrev can be found at:
>   http://cr.openjdk.java.net/~chegar/6882594/webrev.1/webrev/
This looks much better.

In HttpURLConnection there are a few places where there are have 
expressions like
  !(proxyAuthenitcation.getAuthScheme() == NTLM)
I assume this would be neater as:
  (proxAuthenitcation.getAuthScheme() != NTLM)

Are tryTransparentNTLMServer/Proxy needed? I'm not too familiar with the 
NTLM code but it looks like they are always initialized to 
NTLMAuthentication.supportsTransparentAuth which makes me wonder why the 
code can't just be:
   if (NTLMAuthentication.supportsTransparentAuth()) { ... }

For the logging is it necessary to check the logger level? (just 
wondering if HttpCapture can be called directly).

In NTLMAuthenticationProxy should you be using the 3-arg Class.forName? 
Also, if the constructors aren't present then I would think it is a 
fatal error.

Otherwise looks okay to me.

-Alan.








More information about the net-dev mailing list