Skip to content

Commit

Permalink
Refactored getCurrentPrisoners to use getActivePersonnel
Browse files Browse the repository at this point in the history
Replaced `getPersonnel` with `getActivePersonnel` in `getCurrentPrisoners` method. This change ensures only active personnel are checked for prisoner status.
  • Loading branch information
IllianiCBT committed Nov 18, 2024
1 parent 3979544 commit cde4590
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MekHQ/src/mekhq/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -2022,9 +2022,9 @@ public List<Person> getActiveDependents() {
* @return a {@link Person} <code>List</code> containing all active personnel
*/
public List<Person> getCurrentPrisoners() {
return getPersonnel().stream()
.filter(p -> p.getPrisonerStatus().isCurrentPrisoner())
.collect(Collectors.toList());
return getActivePersonnel().stream()
.filter(person -> person.getPrisonerStatus().isCurrentPrisoner())
.collect(Collectors.toList());
}

/**
Expand Down

0 comments on commit cde4590

Please sign in to comment.