United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7128648 HttpURLConnection.getHeaderFields should return an unmodifiable Map
JDK-7128648 : HttpURLConnection.getHeaderFields should return an unmodifiable Map

Details
Type:
Bug
Submit Date:
2012-01-10
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2012-06-11
Component:
core-libs
OS:
generic
Sub-Component:
java.net
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
Since the integration of the HTTPOnly changes, CR 7095980, the map returned by HttpURLConnection.getHeaderFields is not unmodifiable.

This is contradaction to the API specification. URLConnection.getHeaderFields() : "Returns an unmodifiable Map of the header fields. The Map keys are Strings that represent the response-header field names. Each Map value is an unmodifiable List of Strings that represents the corresponding field values."

                                    

Comments
EVALUATION

see description.
                                     
2012-01-10
EVALUATION

Changeset: 31a1fc60a895
Author:    chegar
Date:      2012-01-11 10:52 +0000
URL:       http://hg.openjdk.java.net/jdk8/tl/jdk/rev/31a1fc60a895

7128648: HttpURLConnection.getHeaderFields should return an unmodifiable Map
Reviewed-by: michaelm

! src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
+ test/java/net/HttpURLConnection/UnmodifiableMaps.java
                                     
2012-01-11



Hardware and Software, Engineered to Work Together