public static void ensureXPathNotEmpty ( NodeList nodeList , String expression ) { if ( nodeList == null || nodeList . getLength ( ) == 0 ) { throw LOG . unableToFindXPathExpression ( expression ) ; } }
Ensure that the nodeList is either null or empty .