Skip to content

Commit

Permalink
add testcase for issue #555
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jul 13, 2022
1 parent 9e846aa commit bcd42cf
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions core/src/test/java/com/alibaba/fastjson2/issues/Issue555.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.alibaba.fastjson2.issues;

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

import java.util.Set;

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

public class Issue555 {
@Test
public void test() {
Bean bean = JSON.parseObject("{\"values\":Set[]}", Bean.class);
assertTrue(bean.values.isEmpty());
}

public static class Bean {
private Set<String> values;

public Set<String> getValues() {
return values;
}

public void setValues(Set<String> values) {
this.values = values;
}
}
}

0 comments on commit bcd42cf

Please sign in to comment.