Hi,
The CookieStore.add() method throws a Null Pointer Exception when
null is passed as the uri parameter, although this is allowed according
to the method spec.
The exception is thrown because uri.getHost() is called on a null
uri in an effort to add it to the uriIndex, one of the hash maps
constituting the CookieStore. The fix would be to simply bypass adding
the cookie to the uriIndex when uri is null.
The fix involves updates in:
src/share/classes/java/net/InMemoryCookieStore.java
Webrev : http://cr.openjdk.java.net/~chegar/6953455/webrev.00/webrev/
Thanks,
Kurchi