Prevent Arrays#asList#remove call

Affects issues:
- Fixed #2096
This commit is contained in:
Risto Lahtela 2021-09-22 19:22:06 +03:00
parent b2b289617e
commit e762b8013f

View File

@ -119,9 +119,14 @@ public class PlanPlaceholderExtension extends PlaceholderExpansion {
}
private List<String> parseParameters(String params) {
List<String> parameters = Arrays.asList(params.split(":"));
if (!parameters.isEmpty()) {
parameters.remove(0);
List<String> parameters = new ArrayList<>();
boolean first = true;
for (String parameter : params.split(":")) {
if (first) {
first = false;
} else {
parameters.add(parameter);
}
}
return parameters;
}