mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Update clone() method so that default constructor does not need to be changed
This commit is contained in:
parent
30f5b2de79
commit
09f35372d4
@ -156,14 +156,13 @@ public class XMLParserConfiguration extends ParserConfiguration {
|
|||||||
*/
|
*/
|
||||||
private XMLParserConfiguration (final boolean keepStrings, final String cDataTagName,
|
private XMLParserConfiguration (final boolean keepStrings, final String cDataTagName,
|
||||||
final boolean convertNilAttributeToNull, final Map<String, XMLXsiTypeConverter<?>> xsiTypeMap, final Set<String> forceList,
|
final boolean convertNilAttributeToNull, final Map<String, XMLXsiTypeConverter<?>> xsiTypeMap, final Set<String> forceList,
|
||||||
final int maxNestingDepth, final boolean closeEmptyTag, final boolean shouldTrimWhiteSpace) {
|
final int maxNestingDepth, final boolean closeEmptyTag) {
|
||||||
super(keepStrings, maxNestingDepth);
|
super(keepStrings, maxNestingDepth);
|
||||||
this.cDataTagName = cDataTagName;
|
this.cDataTagName = cDataTagName;
|
||||||
this.convertNilAttributeToNull = convertNilAttributeToNull;
|
this.convertNilAttributeToNull = convertNilAttributeToNull;
|
||||||
this.xsiTypeMap = Collections.unmodifiableMap(xsiTypeMap);
|
this.xsiTypeMap = Collections.unmodifiableMap(xsiTypeMap);
|
||||||
this.forceList = Collections.unmodifiableSet(forceList);
|
this.forceList = Collections.unmodifiableSet(forceList);
|
||||||
this.closeEmptyTag = closeEmptyTag;
|
this.closeEmptyTag = closeEmptyTag;
|
||||||
this.shouldTrimWhiteSpace = shouldTrimWhiteSpace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -176,16 +175,17 @@ public class XMLParserConfiguration extends ParserConfiguration {
|
|||||||
// item, a new map instance should be created and if possible each value in the
|
// item, a new map instance should be created and if possible each value in the
|
||||||
// map should be cloned as well. If the values of the map are known to also
|
// map should be cloned as well. If the values of the map are known to also
|
||||||
// be immutable, then a shallow clone of the map is acceptable.
|
// be immutable, then a shallow clone of the map is acceptable.
|
||||||
return new XMLParserConfiguration(
|
final XMLParserConfiguration config = new XMLParserConfiguration(
|
||||||
this.keepStrings,
|
this.keepStrings,
|
||||||
this.cDataTagName,
|
this.cDataTagName,
|
||||||
this.convertNilAttributeToNull,
|
this.convertNilAttributeToNull,
|
||||||
this.xsiTypeMap,
|
this.xsiTypeMap,
|
||||||
this.forceList,
|
this.forceList,
|
||||||
this.maxNestingDepth,
|
this.maxNestingDepth,
|
||||||
this.closeEmptyTag,
|
this.closeEmptyTag
|
||||||
this.shouldTrimWhiteSpace
|
|
||||||
);
|
);
|
||||||
|
config.shouldTrimWhiteSpace = this.shouldTrimWhiteSpace;
|
||||||
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user