[TYRUS-211] HandshakeRequest.getParameterMap is not umodifiable Created: 08/Jul/13  Updated: 08/Jul/13  Resolved: 08/Jul/13

Status: Resolved
Project: tyrus
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.2

Type: Bug Priority: Major
Reporter: jan.supol Assignee: Pavel Bucek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


javadoc says:

the unmodifiable map of the request parameters.

It is not unmodifiable:

public class ReadonlyGetParamsConfigurator extends Configurator {
	static final String KEY = "ReadOnlyKey";
	static final String [] VALUES = { "ReadOnlyValue1", "ReadOnlyValue2" };

	public void modifyHandshake(ServerEndpointConfig sec,
			HandshakeRequest request, HandshakeResponse response) {
		Map<String, List<String>> map = request.getParameterMap();
		try {
			map.put(KEY, Arrays.asList(VALUES));
		} catch (Exception e) {
		map = request.getParameterMap();

The headers on client contains ReadOnlyKey.

Comment by Pavel Bucek [ 08/Jul/13 ]

fixed in the trunk (svn rev 718)

Generated at Wed Apr 26 05:28:46 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.