REQ-3754: 防御

This commit is contained in:
yanglin 2025-03-03 10:27:00 +08:00
parent 7bb8ee037b
commit 2d7a699ad0

View File

@ -98,6 +98,7 @@ public class ParsedModelV3 implements MessageButtonProvider<ParsedButtonV3>, Pus
public void sortButtons() {
if (buttons == null) return;
this.buttons = new ArrayList<>(buttons);
buttons.sort(Comparator.comparingInt(ParsedButtonV3::determinePriority));
}