Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyAccess.setProperty doesn't convert Collection's value type #19

Open
wuhaixing opened this issue Jul 27, 2011 · 0 comments
Open

Comments

@wuhaixing
Copy link

I just add a test to PropertyAccessTests in MVEL

  public class Datas {
         private List<Long> ids = new ArrayList<Long>();
         public void setIds(List<Long> ids) {
             this.ids = ids;
         }
         public List<Long> getIds() {
             return this.ids;
         }

  }
  public void testBindingConvert() {

      Datas datas = new Datas();
      List values = new ArrayList();
      values.add("1");
      values.add("2");
      values.add("3");
      MVEL.setProperty(datas, "ids", values);

      assertEquals(new Long(1),datas.getIds().get(0));

  }

and got this:

testBindingConvert(org.mvel2.tests.core.PropertyAccessTests): expected:<1> but was:<1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant