<commit_before>package com.fasterxml.jackson.failing;

import com.fasterxml.jackson.annotation.*;

import com.fasterxml.jackson.databind.*;

/**
 * Unit tests for checking handling of unknown properties
 */
public class TestUnknownProperty426 extends BaseMapTest
{
    // For [Issue#426]
    @JsonIgnoreProperties({ "userId" })
    static class User {
        public String firstName;
        Integer userId; 

        void setUserId(String id) {
            setUserId(new Integer(id));
        }

        public Integer getUserId() {
            return userId;
        }

        public void setUserId(Integer v) {
            this.userId = v;
        }
    }

    /*
    /**********************************************************
    /* Test methods
    /**********************************************************
     */

    private final ObjectMapper MAPPER = new ObjectMapper();

    public void testIssue426() throws Exception
    {
        final String JSON = aposToQuotes("{'userId': 9, 'firstName': 'Mike' }");
        User result = MAPPER.readerFor(User.class).readValue(JSON);
        assertNotNull(result);
        assertEquals("Mike", result.firstName);
    }
}

<commit_msg>Minor fix to keep #426 failing (wasn't, due to an unrelated fix, but fundamentally problem still exists)<commit_after>package com.fasterxml.jackson.failing;

import com.fasterxml.jackson.annotation.*;

import com.fasterxml.jackson.databind.*;

/**
 * Unit tests for checking handling of unknown properties
 */
public class TestUnknownProperty426 extends BaseMapTest
{
    // For [databind#426]
    @JsonIgnoreProperties({ "userId" })
    static class User {
        public String firstName;
        Integer userId; 

        void setUserId(CharSequence id) {
            // 21-Dec-2015, tatu: With a fix in 2.7, use of String would not
            //   trigger the problem, so use CharSequence...
            setUserId(new Integer(id.toString()));
        }

        public Integer getUserId() {
            return userId;
        }

        public void setUserId(Integer v) {
            this.userId = v;
        }
    }

    /*
    /**********************************************************
    /* Test methods
    /**********************************************************
     */

    private final ObjectMapper MAPPER = new ObjectMapper();

    public void testIssue426() throws Exception
    {
        final String JSON = aposToQuotes("{'userId': 9, 'firstName': 'Mike' }");
        User result = MAPPER.readerFor(User.class).readValue(JSON);
        assertNotNull(result);
        assertEquals("Mike", result.firstName);
    }
}


{'fraction_non_alphanumeric': 0.18524153670597185, 'fraction_numerical': 0.011791555724610117, 'mean_word_length': 2.6527777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '140657', 'n_tokens_mistral': 728, 'n_tokens_neox': 661, 'n_words': 180}