mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-08 11:34:43 +08:00
Added shallow copy for config map
This commit is contained in:
@@ -24,6 +24,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -278,7 +279,8 @@ public class XMLParserConfiguration {
|
||||
*/
|
||||
public XMLParserConfiguration withXsiTypeMap(final Map<String, XMLXsiTypeConverter<?>> xsiTypeMap) {
|
||||
XMLParserConfiguration newConfig = this.clone();
|
||||
newConfig.xsiTypeMap = Collections.unmodifiableMap(xsiTypeMap);
|
||||
Map<String, XMLXsiTypeConverter<?>> cloneXsiTypeMap = new HashMap<String, XMLXsiTypeConverter<?>>(xsiTypeMap);
|
||||
newConfig.xsiTypeMap = Collections.unmodifiableMap(cloneXsiTypeMap);
|
||||
return newConfig;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user