判断参数是否为NULL，如果为NULL，抛出参数异常

@param objName 参数名
@param obj 参数对象
@throws ParamException
188823
public static void AssertNotNull(String objName, Object obj) throws ParamException {
        if (obj == null) {
            throw new ParamException(objName + " is null, please check!");
        }
    }
317901
public static void objectNotNull(Object object, String name) {
        if (verify) {
            if (object == null) {
                throw new IllegalArgumentException(name+":"+object);
            }
        }
    }
733989
protected void addIfNonNull(final JsonObject obj, final String key, final JsonElement value) {

		if (value != null && !JsonNull.INSTANCE.equals(value)) {

			obj.add(key, value);
		}
	}
79056
public void encodeNullToNull(Writer writer, T obj) throws IOException {
		if (obj == null) {
			writer.write("null");
			return;
		}

		JsonUtil.startHash(writer);

		encodeValue(writer, obj);

		JsonUtil.endHash(writer);

		writer.flush();
	}
1245598
@Override
    public void visitCode(Code obj) {
        try {
            userValues = new HashMap<>();
            loops = new HashMap<>();
            isInstanceMethod = !getMethod().isStatic();
            super.visitCode(obj);
        } finally {
            userValues = null;
            loops = null;
        }
    }
1051863
public static void notNull(final Object object, final String objectName) {
        if (object == null) {
            throw new IllegalArgumentException("expecting non-null value for " + maskNullArgument(objectName));
        }
    }
197465
private static String buildObjectName(final Object object, final String... parameters) {
		final StringBuilder objectName = new StringBuilder();
		objectName.append(object.getClass().getPackage().getName());
		objectName.append(":type=");
		objectName.append(object.getClass().getName());
		if (parameters.length > 0) {
			objectName.append('(');
			for (final String parameter : parameters)
				objectName.append(parameter).append(',');
			objectName.deleteCharAt(objectName.length() - 1);
			objectName.append(')');
		}
		return objectName.toString();
	}

	/**
	 * Private constructor.
	 */
	private MBeanRegisterUtil() {
		throw new IllegalAccessError("Can't instantiate.");
	}
}
952974
public void setObject(final int parameterIndex, 
                          final Object x) throws SQLException {

        if (x == null) {
            if ("true".equals(connection.getProperties().
                              get("acolyte.parameter.untypedNull"))) {

                // Fallback to String-VARCHAR
                setObject(parameterIndex, null, Types.VARCHAR);

                return;
            } // end of if

            throw new SQLException("Cannot set parameter from null object");
        } // end of if

        // ---

        final String className = normalizeClassName(x.getClass());

        if (!Defaults.jdbcTypeClasses.containsKey(className)) {
            throw new SQLFeatureNotSupportedException("Unsupported parameter type: " + className);
        } // end of if
        
        // ---

        final int sqlType = Defaults.jdbcTypeClasses.get(className);

        setObject(parameterIndex, x, sqlType);
    }
31334
public <P extends ParaObject> P update(P obj) {
		if (obj == null) {
			return null;
		}
		return getEntity(invokePatch(obj.getType().concat("/").concat(obj.getId()), Entity.json(obj)), obj.getClass());
	}
890587
public static void parametersNotNull(final String names, final Object... objects) {
        String msgPrefix = "At least one of the parameters";

        if (objects != null) {
            if (objects.length == 1) {
                msgPrefix = "Parameter";
            }

            for (final Object object : objects) {
                if (object == null) {
                    raiseError(String.format("%s '%s' is null.", msgPrefix, names));
                }
            }
        }
    }
514005
@Override
	public void bind(String name, Object obj) throws NamingException
    {
        bind(new CompositeName(name), obj);
    }
1270398
@Override
  public void persist(Object obj) {
    if (null == obj) {
      throw new IllegalArgumentException("object to save cannot be null");
    }
    objMapper.saveObj(keyspace, obj);
  }
609917
public static String serialize(Object obj) throws ApiException {
        try {
            if (obj != null)
                    if (obj instanceof String) {
                        // This assumes that we receive json as a string
                        return (String) obj;
                } else {
                        return JsonUtil.getJsonMapper().writeValueAsString(obj);
                }
            else
                return null;
        }
        catch (Exception e) {
            throw new ApiException(500, e.getMessage());
        }
    }
796302
public static ArrayNode getArray(ObjectNode obj, String fieldName) {
		return obj == null ? null : array(obj.get(fieldName));
	}
930074
public static void validateNull(String name, Object object) {
		if (object == null) {
			throw new IllegalStateException(name.concat(" cannot be null"));
		}
	}
674265
public void setCurrentObject(Object obj) {
        if (((obj == null) && (this.nullString != null))
                || this.requiredType.isInstance(obj)
                || (obj instanceof String)
                || (obj instanceof File)
             //   || ((obj instanceof Task) && this.requiredType.isAssignableFrom(((Task) obj).getTaskResultType()))
                ) {
            this.currentValue = obj;
        } else {
            throw new IllegalArgumentException("Object not of required type.");
        }
    }
1243187
@Override
  public void delete(ApiType obj) {
    String key = keyFunc.apply(obj);
    lock.lock();
    try {
      boolean exists = this.items.containsKey(key);
      if (exists) {
        this.deleteFromIndices(this.items.get(key), key);
        this.items.remove(key);
      }
    } finally {
      lock.unlock();
    }
  }