Skip to content

Commit

Permalink
add testcase for issue #3163
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Nov 21, 2024
1 parent 2a898e6 commit 0f74507
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.alibaba.fastjson2.issues_3100;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.annotation.JSONField;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class Issue3163 {
@Test
public void test() {
Bean bean = JSON.parseObject("{\"id\":1234}", Bean.class);
assertEquals(0, bean.id);
}

public static class Bean {
@JSONField(deserialize = false)
public int id;
}
}

0 comments on commit 0f74507

Please sign in to comment.