Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 4fadfd0

Browse files
committed
add testcase for #3655
1 parent ba07c7f commit 4fadfd0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.alibaba.json.bvt.issue_3600;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.alibaba.fastjson.serializer.SerializerFeature;
5+
import junit.framework.TestCase;
6+
7+
public class Issue3655 extends TestCase {
8+
9+
public void test1() {
10+
B b = new B(null);
11+
System.out.println(JSON.toJSONString(b, SerializerFeature.WriteNullStringAsEmpty));
12+
}
13+
14+
public static abstract class A {
15+
public abstract Object getData();
16+
}
17+
18+
public static class B extends A {
19+
private String data;
20+
21+
public B(String data) {
22+
this.data = data;
23+
}
24+
25+
public String getData() {
26+
return this.data;
27+
}
28+
29+
public void setData(String data) {
30+
this.data = data;
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)