Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.15
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Number of attachments :
Description
package test;
public class MvelContext {
private String[] regkeys;
public void setRegkeys(String[] regkeys)
public void setRegkeys(String regkey) {this.regkeys = regkey.split(",");}
}
public class MvelContextTest {
@Test
public void testname() throws Exception { MvelContext mvelContext = new MvelContext(); MVEL.setProperty(mvelContext, "regkeys", "s"); }
}
throws org.mvel.ConversionException: unable to resolve property: cannot convert type: class java.lang.String: to class [Ljava.lang.String;
at org.mvel.PropertyAccessor.set(PropertyAccessor.java:267)
at org.mvel.PropertyAccessor.set(PropertyAccessor.java:140)
at org.mvel.MVEL.setProperty(MVEL.java:575)
at test.MvelContextTest.testname(MvelContextTest.java:12)
when I change the order of this two methods in class test.MvelContext .
public class MvelContext {
private String[] regkeys;
public void setRegkeys(String regkey) {this.regkeys = regkey.split(",");}
public void setRegkeys(String[] regkeys) {this.regkeys = regkeys;}
}
It works fine.