mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 14:01:47 +01:00
Fixed UnsupportedOperationException related to TabInfo annotation
This commit is contained in:
parent
bb78e41c84
commit
d7db05e344
@ -24,7 +24,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.text.TextStringBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -44,11 +44,19 @@ public class TabInformation {
|
||||
this(
|
||||
tabName,
|
||||
icon,
|
||||
elementOrder == null ? new ArrayList<>() : Arrays.asList(elementOrder),
|
||||
createElementOrderList(elementOrder),
|
||||
tabPriority
|
||||
);
|
||||
}
|
||||
|
||||
private static List<ElementOrder> createElementOrderList(ElementOrder[] elementOrder) {
|
||||
List<ElementOrder> list = new ArrayList<>();
|
||||
if (elementOrder != null) {
|
||||
Collections.addAll(list, elementOrder);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public TabInformation(String tabName, Icon icon, List<ElementOrder> elementOrder, int tabPriority) {
|
||||
this.tabName = tabName;
|
||||
this.icon = icon;
|
||||
|
Loading…
Reference in New Issue
Block a user