RFR 7115150: java.net.HttpCookie code cleanup, style, formatting, typos

Chris Hegarty chris.hegarty at oracle.com
Wed Nov 23 09:57:07 PST 2011


This CR is simply to cleanup the style of the java.net.HttpCookie source 
code. This has bugged me for a while!

  1) Remove extraneous newlines
  2) Use consistent javadoc comment style
  3) Fix typos in public specification, specifically:
     http->HTTP, url->URL, seperated->separated, llegal->illegal
  4) Where possible limit code to 80 columns

Minor implementation changes
  1) Make 'name', 'assignors', and 'whenCreated', final since they are
     immutable
  2) Remove unnecessary StringBuilder from toNetscapeHeaderString
     ( since it is using String concatenation )
  3) Use diamond in ArrayList construction, parse()

For ease of review I generated HTML diffs of the javadoc (see webrev). 
Reviewers can simply scan the javadoc diffs, and scan the new source 
file for style ( and be confident that there are no spec changes ).

http://cr.openjdk.java.net/~chegar/7115150/webrev.00/webrev/

Thanks,
-Chris.



More information about the net-dev mailing list