Validates a given object to be null

@param object The object to check
@param name The name of the field to display the error message
@param message A custom error message instead of the default one
966896
public void validateNull(Object object, String name, String message) {
        if (object != null) {
            addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.NULL_KEY.name(), name)));
        }
    }
801442
private void validate(Object object) {
		Set<ConstraintViolation<Object>> viols = validator.validate(object);
		for (ConstraintViolation<Object> constraintViolation : viols) {
			if (Null.class.isAssignableFrom(constraintViolation.getConstraintDescriptor().getAnnotation().getClass())) {
				Object o = constraintViolation.getLeafBean();
				Iterator<Node> iterator = constraintViolation.getPropertyPath().iterator();
				String propertyName = null;
				while (iterator.hasNext()) {
					propertyName = iterator.next().getName();
				}
				if (propertyName != null) {
					try {
						PropertyDescriptor descriptor = BeanUtils.getPropertyDescriptor(o.getClass(), propertyName);
						descriptor.getWriteMethod().invoke(o, new Object[] { null });
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}
		}
	}
317901
public static void objectNotNull(Object object, String name) {
        if (verify) {
            if (object == null) {
                throw new IllegalArgumentException(name+":"+object);
            }
        }
    }
480401
static public void assertNull(Object object) {
    		String message = "Expected: <null> but was: " + String.valueOf(object);
    		assertNull(message, object);
    	}
419402
public void expectEmail(String name, String message) {
        String value = Optional.ofNullable(get(name)).orElse("");

        if (!EmailValidator.getInstance().isValid(value)) {
            addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.EMAIL_KEY.name(), name)));
        }
    }
228827
public void validateNotNull(Object object, String name) {
        validateNotNull(object, name, messages.get(Validation.NOTNULL_KEY.name(), name));
    }
749625
public void error(Object message)
    {
        if (IS12)
        {
            getLogger().log(FQCN, Level.ERROR, message, null);
        }
        else
        {
            getLogger().log(FQCN, Level.ERROR, message, null);
        }
    }
1351302
public static void checkNotNull(@Nullable Object object, @NonNull String message) {
        if (object == null) {
            throw new NullPointerException(message);
        }
    }
804769
public void expectValue(String name) {
        expectValue(name, messages.get(Validation.REQUIRED_KEY.name(), name));
    }
274192
@SuppressWarnings("all")
    public void validateFalse(boolean value, String name, String message) {
        if (value) {
            addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.FALSE_KEY.name(), name)));
        }
    }
1351548
public static void validateNotNull( Object object, String identifier )
        throws PreConditionException
    {
        if( object == null )
        {
            throw new PreConditionException( identifier + " was NULL." );
        }
    }
259042
public void expectMin(String name, double minLength, String message) {
        String value = Optional.ofNullable(get(name)).orElse("");

        if (StringUtils.isNumeric(value)) {
            if (Double.parseDouble(value) < minLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MIN_KEY.name(), name, minLength)));
            }
        } else {
            if (value.length() < minLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MIN_KEY.name(), name, minLength)));
            }
        }
    }
218768
static void validateHeaderName(CharSequence name) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (name.length() == 0) {
            throw new IllegalArgumentException(
                    "name cannot be length zero");
        }
        // Since name may only contain ascii characters, for valid names
        // name.length() returns the number of bytes when UTF-8 encoded.
        if (name.length() > SPDY_MAX_NV_LENGTH) {
            throw new IllegalArgumentException(
                    "name exceeds allowable length: " + name);
        }
        for (int i = 0; i < name.length(); i ++) {
            char c = name.charAt(i);
            if (c == 0) {
                throw new IllegalArgumentException(
                        "name contains null character: " + name);
            }
            if (c >= 'A' && c <= 'Z') {
                throw new IllegalArgumentException("name must be all lower case.");
            }
            if (c > 127) {
                throw new IllegalArgumentException(
                        "name contains non-ascii character: " + name);
            }
        }
    }
738627
protected function validateName($name = null)
    {
        if (null == $name) {
            $name = $this->name;
        }

        if (strlen($name) > OBJECT_NAME_LIMIT) {
            throw new Exceptions\InvalidObjectName();
        }
    }
492692
public static void dumpNonNull(String name, Object obj) {
		dumpNonNull(name, obj, StringPrinter.systemOut());
	}
990631
public static void notNull(final Object arg, final String name) {
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
    }
812960
public void error(Object message) {
        log(Level.SEVERE, String.valueOf(message), null);
    }