src/main/java/org/apache/commons/beanutils2/BasicDynaBean.java [322:345]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (value == null) {
            if (descriptor.getType().isPrimitive()) {
                throw new NullPointerException("Primitive value for '" + name + "'");
            }
        } else if (!isAssignable(descriptor.getType(), value.getClass())) {
            throw ConversionException.format("Cannot assign value of type '%s' to property '%s' of type '%s'", value.getClass().getName(), name,
                    descriptor.getType().getName());
        }
        values.put(name, value);
    }

    /**
     * Sets the value of a mapped property with the specified name.
     *
     * @param name  Name of the property whose value is to be set
     * @param key   Key of the property to be set
     * @param value Value to which this property is to be set
     * @throws ConversionException      if the specified value cannot be converted to the type required for this property
     * @throws IllegalArgumentException if there is no property of the specified name
     * @throws IllegalArgumentException if the specified property exists, but is not mapped
     */
    @SuppressWarnings("unchecked")
    @Override
    public void set(final String name, final String key, final Object value) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/commons/beanutils2/LazyDynaBean.java [787:812]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (value == null) {
            if (descriptor.getType().isPrimitive()) {
                throw new NullPointerException("Primitive value for '" + name + "'");
            }
        } else if (!isAssignable(descriptor.getType(), value.getClass())) {
            throw ConversionException.format("Cannot assign value of type '%s' to property '%s' of type '%s'", value.getClass().getName(), name,
                    descriptor.getType().getName());
        }

        // Set the property's value
        values.put(name, value);
    }

    /**
     * Sets the value of a mapped property with the specified name.
     *
     * @param name  Name of the property whose value is to be set
     * @param key   Key of the property to be set
     * @param value Value to which this property is to be set
     * @throws ConversionException      if the specified value cannot be converted to the type required for this property
     * @throws IllegalArgumentException if there is no property of the specified name
     * @throws IllegalArgumentException if the specified property exists, but is not mapped
     */
    @SuppressWarnings("unchecked")
    @Override
    public void set(final String name, final String key, final Object value) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



