public static List<ParamFlowRule> getRulesOfResource(String resourceName) {
return new ArrayList((Collection)PARAM_FLOW_RULES.get(resourceName));
}
当PARAM_FLOW_RULES.get(resourceName)为null的时候, new ArrayList就会报空指针异常。
这个在对应的resourceName没有配置规则的时候,就会触发。
1条答案
按热度按时间7y4bm7vi1#
it seems that it will not cause npe here, because of the return of
PARAM_FLOW_RULES.get(resourceName)
will be empty list if not rule configured.