public static PushResponseCode valueOf(String value) {
return (PushResponseCode) intPushResponseCodeMap.get(Integer.valueOf(value));
}
这里错误将 value 转换为了 Integer,但是 intPushResponseCodeMap 的 key 是 String。所以这个方法一直都会获取到 null。
private static HashMap<String, PushResponseCode> intPushResponseCodeMap = createIntegerPushResponseCodeMapping();