<commit_before>package com.alibaba.json.bvt.issue_1200;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import junit.framework.TestCase;
import org.springframework.util.LinkedMultiValueMap;

/**
 * Created by kimmking on 06/06/2017.
 */
public class Issue1246 extends TestCase {
    public void test_for_issue() throws Exception {
        B b = new B();
        b.setX("xx");
        String test = JSON.toJSONString( b );
        System.out.println(test);
        assertEquals("{}",test);
    }

    public static class A{
        private String x;

        public String getX() {
            return x;
        }

        public void setX(String x) {<commit_msg>commit a new case for issue1246<commit_after>package com.alibaba.json.bvt.issue_1200;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import junit.framework.TestCase;
import org.springframework.util.LinkedMultiValueMap;

/**
 * Created by kimmking on 06/06/2017.
 */
public class Issue1246 extends TestCase {
    public void test_for_issue() throws Exception {
        B b = new B();
        b.setX("xx");

        String test = JSON.toJSONString( b );
        System.out.println(test);
        assertEquals("{}", test);

        C c = new C();
        c.ab = b;

        String testC = JSON.toJSONString( c );
        System.out.println(testC);
        assertEquals("{\"ab\":{}}",testC);
    }

    public static class C{
        public A ab;
    }

    public static class A{
        private String x;

        public String getX() {
            return x;
        }

        public void setX(String x) {
{'fraction_non_alphanumeric': 0.11159029649595688, 'fraction_numerical': 0.01940700808625337, 'mean_word_length': 2.6898608349900597, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '530371', 'n_tokens_mistral': 597, 'n_tokens_neox': 552, 'n_words': 137}