这么写 会报错 谁给解释下 谢谢
public class UnionLevelUpgradeManager {
private static Map<Integer, UnionLevelUpgrade> levelUpgrades;
static {
synchronized (UnionLevelUpgradeManager.class) {
if(levelUpgrades == null)
reloadLevelUpgrades();
}
}
public static synchronized void reloadLevelUpgrades() {
if(levelUpgrades == null)
levelUpgrades = new HashMap<Integer, UnionLevelUpgrade>();
}
}