jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/Headers.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
125 public void set (String key, String value) { |
125 public void set (String key, String value) { |
126 LinkedList<String> l = new LinkedList<String>(); |
126 LinkedList<String> l = new LinkedList<String>(); |
127 l.add (value); |
127 l.add (value); |
128 put(key, l); |
128 put(key, l); |
129 } |
129 } |
|
130 /** |
|
131 * Added to fix issue |
|
132 * putAll() is easier to deal with as it doesn't return anything |
|
133 */ |
|
134 public void putAll(Map<? extends String,? extends List<String>> map) { |
|
135 for (String k : map.keySet()) { |
|
136 List<String> list = map.get(k); |
|
137 for (String v : list) { |
|
138 add(k,v); |
|
139 } |
|
140 } |
|
141 } |
130 |
142 |
131 } |
143 } |