Getting rid of NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE?
问题 I'm getting NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE in this snippet final Integer id = Ints.tryParse(idString); FailReason.NO_SUCH_THING.checkCondition(id!=null); something.setId(id.intValue()); Here, checkCondition works just like Preconditions.checkArgument except for it throws my own exception. Throwing NPE or IAE is not appropriate here, as it's checking an external input rather than a programming error. FindBugs complains that "The return value from a method is dereferenced without a null