8007315 deals with an issue in SAAJ code where a NullPointerException is seen.

The SAAJ code makes the assumption that non-null keys obtained from a httpURLConnection header will contain non-null values :

294                     key = httpConnection.getHeaderFieldKey(i);
295 value = httpConnection.getHeaderField(i); --> assumed to be non-null

A behavioural change came into jdk7u4 with the 7095980 fix. With the filtering of httpOnly cookies, when cookieHandler is set, the code returns null if no other values are present in the values returned for a header key. I'm proposing to change that to be an empty string instead ("").

I've added extra scenarios to the original 7095980 unit testcase also to cover this scenario.

bug : http://bugs.sun.com/view_bug.do?bug_id=8007315
webrev : http://cr.openjdk.java.net/~coffeys/webrev.8007315.jdk8/

regards,
Sean.


Reply via email to