mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-04 01:35:33 +08:00
Fix cloning of parser configuration.
This commit is contained in:
@@ -37,6 +37,7 @@ public class JSONParserConfiguration extends ParserConfiguration {
|
||||
clone.strictMode = strictMode;
|
||||
clone.maxNestingDepth = maxNestingDepth;
|
||||
clone.keepStrings = keepStrings;
|
||||
clone.useNativeNulls = useNativeNulls;
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
@@ -53,6 +53,14 @@ public class JSONParserConfigurationTest {
|
||||
|
||||
assertTrue(jsonParserConfiguration.isKeepStrings());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void useNativeNullsIsCloned() {
|
||||
JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration()
|
||||
.withUseNativeNulls(true)
|
||||
.withStrictMode(true);
|
||||
assertTrue(jsonParserConfiguration.isUseNativeNulls());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyDuplicateKeyThenMaxDepth() {
|
||||
|
Reference in New Issue
Block a user