2023-July-05 - 2.6.14388
Pre-release
Pre-release
Fix 2.6 NoSuchElementException in AA code. (#11734)
This would happen if a unit has special chars in its aaType, causing it to be evaluated as a regex instead of an exact match.
This specifically broke the code pattern (e.g. in FiringGroupSplitterAa):
final List<String> typeAas = UnitAttachment.getAllOfTypeAas(aaUnits);
for (final String typeAa : typeAas) {
final Collection<Unit> firingUnits =
CollectionUtils.getMatches(aaUnits, Matches.unitIsAaOfTypeAa(typeAa));
Causing an empty `firingUnits` due to typeAa being evaluated as a regex.
I checked all the callsites and verified none of them actually require the regex behavior.
Fixes: https://github.com/triplea-game/triplea/issues/11458