RFR: (JDK-8005406) HTTP server implementation should use Base64 API

Chris Hegarty chris.hegarty at oracle.com
Tue Jan 15 01:19:44 PST 2013


On 01/15/2013 08:29 AM, Alan Bateman wrote:
> On 14/01/2013 22:24, Mark Sheppard wrote:
>> Hi,
>>
>> Request for review of JDK-8005406, this time!
>>
>> This is the second in a series of refactorings which migrate base64
>> support in various
>> packages to utilize the base64 support from java.util.Base64.
>>
>> This is the modification of
>> com.sun.net.httpserver.BasicAuthenticator.java
>> to use java.util.Base64.
>>
>> This makes changes to the BasicAuthenticator class to use
>> java.util.Base64.Decoder, and removes a
>> package private Base64 class.
>>
>> webrev located at
>> http://cr.openjdk.java.net/~chegar/8005406
>>
> This looks good to me and great to see it changed to use
> java.util.Base64. Minor comment is that the import of Base64.Decoder
> doesn't appear to be needed.

Agreed.

The old package-private Base64 implementation seems to have been copied 
from prefs. It includes an alternative implementation, but that never 
seems to be used. Your changes make this code much cleaner.

I can push this for you.

-Chris.

>
> -Alan



More information about the net-dev mailing list