一种强制要求传入参数不能为null的做法

入参:r,若r==null则会抛空指针错误!
Objects.requireNonNull(r);

猜你喜欢

转载自liushuiwuyan.iteye.com/blog/2281318