Here you can find the source of assertNull(Object obj)
public static void assertNull(Object obj)
//package com.java2s; // The MIT License (MIT) public class Main { public static void assertNull(Object obj) { if (obj != null) { throw new IllegalArgumentException(); }//from w w w . j av a 2 s . c o m } public static void assertNull(Object obj, String errorMessage) { if (obj != null) { throw new IllegalArgumentException(errorMessage); } } }