From cde45908a1f825f56d66f368ea2a7b178680b37a Mon Sep 17 00:00:00 2001 From: IllianiCBT Date: Mon, 18 Nov 2024 12:33:25 -0600 Subject: [PATCH] Refactored `getCurrentPrisoners` to use `getActivePersonnel` Replaced `getPersonnel` with `getActivePersonnel` in `getCurrentPrisoners` method. This change ensures only active personnel are checked for prisoner status. --- MekHQ/src/mekhq/campaign/Campaign.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MekHQ/src/mekhq/campaign/Campaign.java b/MekHQ/src/mekhq/campaign/Campaign.java index 2d7aa84b72..3a7f3a3354 100644 --- a/MekHQ/src/mekhq/campaign/Campaign.java +++ b/MekHQ/src/mekhq/campaign/Campaign.java @@ -2022,9 +2022,9 @@ public List getActiveDependents() { * @return a {@link Person} List containing all active personnel */ public List getCurrentPrisoners() { - return getPersonnel().stream() - .filter(p -> p.getPrisonerStatus().isCurrentPrisoner()) - .collect(Collectors.toList()); + return getActivePersonnel().stream() + .filter(person -> person.getPrisonerStatus().isCurrentPrisoner()) + .collect(Collectors.toList()); } /**