提交 00bbb28b 编写于 作者: W wenshao

add testcase for issue #569

上级 86aa0a6e
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<Value> result = JSON.parseObject(json, new TypeReference<InterfaceResult<Value>>() {});
assertNotNull(result.getResult());
assertEquals(Value.class, result.getResult().getClass());
}
public static class BaseInterfaceResult {
}
public static class InterfaceResult<T> extends BaseInterfaceResult
{
public T getResult() {
return result;
}
public void setResult(T result) {
this.result = result;
}
private T result;
}
public static class Value {
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册