mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-16 23:55:11 +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 org.apache.commons.text.TextStringBuilder;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,11 +44,19 @@ public class TabInformation {
|
|||||||
this(
|
this(
|
||||||
tabName,
|
tabName,
|
||||||
icon,
|
icon,
|
||||||
elementOrder == null ? new ArrayList<>() : Arrays.asList(elementOrder),
|
createElementOrderList(elementOrder),
|
||||||
tabPriority
|
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) {
|
public TabInformation(String tabName, Icon icon, List<ElementOrder> elementOrder, int tabPriority) {
|
||||||
this.tabName = tabName;
|
this.tabName = tabName;
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
Loading…
Reference in New Issue
Block a user