Here you can find the source of assertNotNull(T obj)
public static <T> T assertNotNull(T obj)
//package com.java2s; // The MIT License (MIT) public class Main { public static <T> T assertNotNull(T obj) { if (obj == null) { throw new NullPointerException(); }//from w w w. j a v a 2 s . c o m return obj; } public static <T> T assertNotNull(T obj, String errorMessage) { if (obj == null) { throw new NullPointerException(errorMessage); } return obj; } }