【发布时间】:2013-04-10 22:04:56
【问题描述】:
假设我有这样一段代码:
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 标记了这一点,如果可能的话,我需要提供类似的东西。
【问题讨论】:
标签: java sonarqube findbugs pmd codepro