Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-400

set get Array in map fail?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.0.0
    • Bean / Property Utils
    • None
    • jdk1.6

    Description

      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]"));

      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smildlzj smildlzj
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: