Fixes for new Eclipse warnings.

This commit is contained in:
MobiusDev
2017-09-27 01:59:41 +00:00
parent 3cb7b3f70e
commit bb9e1f2827
34 changed files with 68 additions and 56 deletions

View File

@@ -421,7 +421,7 @@ public final class SkillTreesData implements IGameXmlReader
}
else if (type.equals("revelationSkillTree") && (subType != null))
{
final Map<Long, L2SkillLearn> revelationSkillTrees = _revelationSkillTree.get(race);
final Map<Long, L2SkillLearn> revelationSkillTrees = _revelationSkillTree.get(subType);
if (revelationSkillTrees == null)
{
_revelationSkillTree.put(subType, revelationSkillTree);

View File

@@ -622,7 +622,7 @@ public class L2Attackable extends L2Npc
@Override
public void addAttackerToAttackByList(L2Character player)
{
if ((player == null) || (player == this) || getAttackByList().contains(player))
if ((player == null) || (player == this) || getAttackByList().stream().anyMatch(o -> o.get() == player))
{
return;
}
@@ -860,7 +860,8 @@ public class L2Attackable extends L2Npc
result.add(mostHated);
if (getAttackByList().contains(secondMostHated))
final L2Character secondMostHatedFinal = secondMostHated;
if (getAttackByList().stream().anyMatch(o -> o.get() == secondMostHatedFinal))
{
result.add(secondMostHated);
}