优雅地对对象判空,并且抛出空指针异常 Java使用Preconditions.checkNotNull(.....)判空对象, 并处理可能的NullPointerException异常 - 风骚羊肉串 - 博客园