Here you can find the source of assertNotNull(Object obj, String msgTemplate, Object... params)
public static void assertNotNull(Object obj, String msgTemplate, Object... params)
//package com.java2s; //License from project: Apache License public class Main { public static void assertNotNull(Object obj, String msgTemplate, Object... params) { if (obj == null) { throw new NullPointerException(getMsg("Assert fail: should not be null", msgTemplate, params)); }/*from ww w . j a va 2 s . c o m*/ } private static String getMsg(String defaultMsg, String msgTemplate, Object[] params) { return msgTemplate == null ? defaultMsg : String.format(msgTemplate, params); } }