fix(Ability.java): Remove unsafe cast

This commit is contained in:
KingRainbow44 2024-09-28 17:34:41 -04:00
parent abb3242e20
commit ab0ec0a0e0
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -65,8 +65,7 @@ public class Ability {
data.modifiers.values().stream() data.modifiers.values().stream()
.map( .map(
m -> m ->
(List<AbilityModifierAction>) m.onAdded == null ? Collections.<AbilityModifierAction>emptyList() : Arrays.asList(m.onAdded))
(m.onAdded == null ? Collections.emptyList() : Arrays.asList(m.onAdded)))
.flatMap(List::stream) .flatMap(List::stream)
.filter(action -> action.type == AbilityModifierAction.Type.AvatarSkillStart) .filter(action -> action.type == AbilityModifierAction.Type.AvatarSkillStart)
.map(action -> action.skillID) .map(action -> action.skillID)