diff --git a/src/test/java/com/alibaba/json/bvt/bug/Issue569_1.java b/src/test/java/com/alibaba/json/bvt/bug/Issue569_1.java new file mode 100644 index 0000000000..5c7fa0bd65 --- /dev/null +++ b/src/test/java/com/alibaba/json/bvt/bug/Issue569_1.java @@ -0,0 +1,35 @@ +package com.alibaba.json.bvt.bug; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import junit.framework.TestCase; + +public class Issue569_1 extends TestCase { + public void test_for_issue() throws Exception { + String json = "{\"result\":{}}"; + InterfaceResult result = JSON.parseObject(json, new TypeReference>() {}); + assertNotNull(result.getResult()); + assertEquals(Value.class, result.getResult().getClass()); + } + + public static class BaseInterfaceResult { + + } + + public static class InterfaceResult extends BaseInterfaceResult + { + public T getResult() { + return result; + } + + public void setResult(T result) { + this.result = result; + } + + private T result; + } + + public static class Value { + + } +}