diff --git a/src/test/java/com/alibaba/json/bvt/bug/Issue585.java b/src/test/java/com/alibaba/json/bvt/bug/Issue585.java index 5b861a0eb3..67b9525c78 100644 --- a/src/test/java/com/alibaba/json/bvt/bug/Issue585.java +++ b/src/test/java/com/alibaba/json/bvt/bug/Issue585.java @@ -8,13 +8,16 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.parser.Feature; +import com.alibaba.fastjson.parser.ParserConfig; import junit.framework.TestCase; public class Issue585 extends TestCase { private String original = JSON.DEFAULT_TYPE_KEY; + private ParserConfig originalConfig = ParserConfig.global; protected void setUp() throws Exception { + ParserConfig.global = new ParserConfig(); if (!JSON.DEFAULT_TYPE_KEY.equals("mySpace")) { JSON.setDefaultTypeKey("mySpace"); } @@ -22,6 +25,7 @@ protected void setUp() throws Exception { protected void tearDown() throws Exception { JSON.setDefaultTypeKey(original); + ParserConfig.global = originalConfig; } public void test_for_issue() throws Exception {