* @throws AssertionError if the given object is null
*/
public static <T> T toNonNull(@Nullable T object) throws AssertionError{
- if(object==null){
- Log.wtf(Utils.class.getName(), "toNonNull called with null");
- throw new AssertionError("Log.wtf did not terminate the process");
- }
+ if(object==null)
+ throw new NullPointerException();
return object;
}