Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
None
Description
If you take a look at MetaBeanProeprty:91
if (getType() == String.class && !(newValue instanceof String))
{ newValue = newValue.toString(); }we are setting a property and to coercion, just because we think it might be needed here. But what if newValue is null? toString will fail then causing the proeprty not being set.
An example for this:
class TestPropertyAccess extends GroovyTestCase {
void testSomething()
}
public class CustomerBean {
private String name;
public String getName()
{ return name; }public void setName(String name)
{ this.name = name; }}