## What is the purpose of the change

fix #5939 

## Brief changelog

Add Key type check. 

## Verifying this change
`    
    @Test
    public void testJsonObjectToMap() throws Exception {
        Method method = PojoUtilsTest.class.getMethod("setMap", Map.class);
        assertNotNull(method);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("1", "test");
        @SuppressWarnings("unchecked")
        Map<Integer, Object> value = (Map<Integer, 
Object>)PojoUtils.realize(jsonObject,
                method.getParameterTypes()[0],
                method.getGenericParameterTypes()[0]);
        method.invoke(new PojoUtilsTest(), value);
        assertEquals("test", value.get(1));
    }

    public void setMap(Map<Integer, Object> map) {}
`


[ Full content available at: https://github.com/apache/dubbo/pull/6100 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to