@@ -32,7 +32,7 @@ public T createInstance() throws Throwable {
3232 ConstructorModel constructor = classModel .constructor ();
3333
3434 if (constructor == null ) {
35- throw new IllegalStateException ("No constructor found" );
35+ throw new IllegalStateException ("No constructor found for " + classModel . clazz () );
3636 }
3737
3838 ParameterModel [] parameters = constructor .parameters ();
@@ -48,8 +48,8 @@ public T createInstance() throws Throwable {
4848 continue ;
4949 }
5050
51- // parent should be passed here
52- Object resolvedValue = value .get ( null );
51+ // TODO parent should be passed here
52+ Object resolvedValue = value .getSafe ( name , null );
5353 validateValue (name , resolvedValue , meta );
5454
5555 values [parameter .index ()] = resolvedValue ;
@@ -97,7 +97,7 @@ private T populate(T instance, boolean skipParams) throws Throwable {
9797 }
9898
9999 if (!canMutate ) {
100- Object resolvedValue = value .get ( instance );
100+ Object resolvedValue = value .getSafe ( name , instance );
101101 validateValue (name , resolvedValue , meta );
102102
103103 property .setter ().set (instance , resolvedValue );
@@ -108,12 +108,12 @@ private T populate(T instance, boolean skipParams) throws Throwable {
108108
109109 if (value instanceof PropertyValue .Mutable ) {
110110 //noinspection unchecked,rawtypes
111- ((PropertyValue .Mutable ) value ).mutate ( instance , currentValue );
111+ ((PropertyValue .Mutable ) value ).mutateSafe ( name , instance , currentValue );
112112 continue ;
113113 }
114114
115115 if (currentValue instanceof Collection || currentValue instanceof Map ) {
116- Object resolvedValue = value .get ( instance );
116+ Object resolvedValue = value .getSafe ( name , instance );
117117 if (resolvedValue == null ) {
118118 validateValue (name , null , meta );
119119 continue ;
0 commit comments