private static void setLeafValueIfUnset(InnerCNode targetDef, Object builder, LeafCNode node) throws Exception {
        if (hasField(builder.getClass(), node.getName())) {
            Field field = builder.getClass().getDeclaredField(node.getName());
            field.setAccessible(true);
            Object val = field.get(builder);
            if (val==null) {
                // Not set on builder, if the leaf node has a default value, try the private setter that takes String
                try {
                    if (node.getDefaultValue()!=null) {
                        Method setter = builder.getClass().getDeclaredMethod(node.getName(), String.class);
                        setter.setAccessible(true);
                        setter.invoke(builder, node.getDefaultValue().getValue());
                    }
                } catch (Exception e) {
                    log.log(Level.SEVERE,
                            "For config '" + targetDef.getFullName() + "': " +
                            "Unable to apply the default value for field '" + node.getName() +
                            "' to config Builder (where it wasn't set)",
                            e);
                }
            }
        }
    }
If some fields on the builder are null now, set them from the def. Do recursively.
<p>
If the targetDef has some schema incompatibilities, they are not handled here
(except logging in some cases), but in ConfigInstance.serialize().

@param  builder a {@link com.yahoo.config.ConfigBuilder}
@param  targetDef a config definition
@throws Exception if applying values form config definitions fails
configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigInstanceBuilder.java