All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.odps.utils.ExceptionUtils Maven / Gradle / Ivy

There is a newer version: 0.51.5-public
Show newest version
package com.aliyun.odps.utils;

import java.util.Collection;

public class ExceptionUtils {

    public static void checkStringArgumentNotNull(String arg, String value) {
        if (StringUtils.isNullOrEmpty(value)) {
            throw new IllegalArgumentException("Argument '" + arg + "' cannot be null or empty");
        }
    }
    public static void checkCollectionArgumentNotNull(String arg, Collection value) {
        if (value == null || value.isEmpty()) {
            throw new IllegalArgumentException("Argument '" + arg + "' cannot be null");
        }
    }

    public static void checkArgumentNotNull(String arg, Object value) {
        if (value == null) {
            throw new IllegalArgumentException("Argument '" + arg + "' cannot be null");
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy