Package org.springframework.beans

Examples of org.springframework.beans.NullValueInNestedPathException


      String baseProperty = getBasePropertyName(propertyPath);
      String childPropertyPath = getChildPropertyPath(propertyPath);
      return ((PropertyAccessor) childPropertyAccessors.get(baseProperty)).getPropertyValue(childPropertyPath);
    }
    else if (isStrictNullHandlingEnabled() && getTarget() == null) {
      throw new NullValueInNestedPathException(getTargetClass(), propertyPath);
    }
    else {
      return super.getPropertyValue(propertyPath);
    }
  }
View Full Code Here


      String baseProperty = getBasePropertyName(propertyPath);
      String childPropertyPath = getChildPropertyPath(propertyPath);
      ((PropertyAccessor) childPropertyAccessors.get(baseProperty)).setPropertyValue(childPropertyPath, value);
    }
    else if (isStrictNullHandlingEnabled() && getTarget() == null) {
      throw new NullValueInNestedPathException(getTargetClass(), propertyPath);
    }
    else {
      super.setPropertyValue(propertyPath, value);
    }
  }
View Full Code Here

          "Neither non-static field nor get-method exists for indexed property");
    }
    Object rootProperty = getPropertyValue(rootPropertyName);
    if (rootProperty == null) {
      if (isStrictNullHandlingEnabled()) {
        throw new NullValueInNestedPathException(getTargetClass(), propertyName);
      }
      else if (isWritableProperty(rootPropertyName)) {
        return null;
      }
      else {
View Full Code Here

  }

  private Object getPropertyValue(Object assemblage, Object[] indices, int parameterIndex) {
    if (assemblage == null) {
      if (isStrictNullHandlingEnabled()) {
        throw new NullValueInNestedPathException(getTargetClass(), "");
      }
      else {
        return null;
      }
    }
View Full Code Here

    catch (NotReadablePropertyException e) {
      throw new NotWritablePropertyException(getTargetClass(), propertyName, "parent property is not readable", e);
    }
    if (parentValue == null) {
      if (isWritableProperty(parentPropertyName)) {
        throw new NullValueInNestedPathException(getTargetClass(), propertyName);
      }
      else {
        throw new NotWritablePropertyException(getTargetClass(), propertyName);
      }
    }
View Full Code Here

      throw new NotWritablePropertyException(getTargetClass(), propertyName,
          "Neither non-static, non-final field nor set-method does exist");
    }
    Object target = getTarget();
    if (target == null) {
      throw new NullValueInNestedPathException(getTargetClass(), propertyName);
    }
    try {
      ReflectionUtils.makeAccessible(writeAccessor);
      if (writeAccessor instanceof Field) {
        ((Field) writeAccessor).set(target, value);
View Full Code Here

TOP

Related Classes of org.springframework.beans.NullValueInNestedPathException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.