Here you can find the source of assertNotNullArgument(Object obj, String argName)
public static void assertNotNullArgument(Object obj, String argName)
//package com.java2s; //License from project: Apache License public class Main { public static void assertNotNullArgument(Object obj, String argName) { if (obj == null) { throw new IllegalArgumentException( "Null Object specified as argument. argumentName[" + argName + "]"); }//from ww w . j a v a 2 s.c om if (obj instanceof String) { assertQualifiedString((String) obj, argName); } } public static void assertQualifiedString(String str, String argName) { if (!isQualifiedString(str)) { throw new IllegalArgumentException( "Null or zero length string found. str[" + str + "] argumentName[" + argName + "]"); } } /** * This method will check for the null string * * @param str to be check * @return true if string is not null */ public static boolean isQualifiedString(String str) { return str != null && str.trim().length() > 0; } }