commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "smildlzj (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEANUTILS-400) set get Array in map fail?
Date Mon, 17 Oct 2011 10:00:11 GMT
set get Array in map fail?
--------------------------

                 Key: BEANUTILS-400
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-400
             Project: Commons BeanUtils
          Issue Type: Bug
          Components: Bean / Property Utils
         Environment: jdk1.6
            Reporter: smildlzj


i have test case like as follow,but was fail!any problem?

public static void testGetMappedArray() throws Exception {
    	String[] array = new String[] {"abc", "def", "ghi"};
    	Map s1=new HashMap();
		Map s2=new HashMap();
		s1.put("mapProperty", s2);
		s2.put("mappedArray", array);

        
        assertEquals("abc", PropertyUtil.getProperty(s1, "mapProperty(mappedArray)[0]"));
        assertEquals("def", PropertyUtil.getProperty(s1, "mapProperty(mappedArray)[1]"));
        assertEquals("ghi", PropertyUtil.getProperty(s1, "mapProperty(mappedArray)[2]"));
        
    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message