假设我有一个这样的代码块:
Map<String, Object> mappy =
(Map<String, Object>)pExtraParameters.get(ServiceClientConstants.EXTRA_PARAMETERS);
if (pSSResponseBean!=null) {
mappy.put(AddressResearchContext.CSI_RESPONSE_BEAN, (AddressNotFoundResponseBean)pSSResponseBean); // this line may throw null pointer
}
是否存在将“mappy”标记为可能为空的 Sonar、Findbugs 或 PMD 规则?显然 CodePro 标记了这一点,如果可能的话,我需要提供类似的东西。