diff --git a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/steps/fire/general/TargetGroup.java b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/steps/fire/general/TargetGroup.java index bb79e35fa53..ada01ff32b5 100644 --- a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/steps/fire/general/TargetGroup.java +++ b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/steps/fire/general/TargetGroup.java @@ -69,14 +69,14 @@ private static Set findTargets( // Note: uses a single stream instead of a sequence of removeAll() calls for performance. return enemyUnitTypes.stream() .filter( - ut -> { - if (cannotTarget.contains(ut)) { + targetUnitType -> { + if (cannotTarget.contains(targetUnitType)) { return false; } if (destroyerPresent) { return true; } - return !ut.getUnitAttachment().getCanNotBeTargetedBy().contains(unitType); + return !targetUnitType.getUnitAttachment().getCanNotBeTargetedBy().contains(unitType); }) .collect(Collectors.toSet()); }