private static String assertNotEmpty(String str, String name, String info) {
    if (str == null) {
      throw new IllegalArgumentException(
          name + " cannot be null" + (info == null ? "" : ", " + info));
    }
    if (str.length() == 0) {
      throw new IllegalArgumentException(
          name + " cannot be empty" + (info == null ? "" : ", " + info));
    }
    return str;
  }
Check that a string is not null and not empty. If null or empty 
throws an IllegalArgumentException.

@param str value.
@param name parameter name for the exception message.
@param info additional information to be printed with the exception message
@return the given value.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ProxyUserSupport.java