Prevent duplicate warnings

This commit is contained in:
M66B 2022-09-01 07:25:40 +02:00
parent 7d4564a4fb
commit 1353013f65
1 changed files with 11 additions and 2 deletions

View File

@ -4065,8 +4065,17 @@ public class MessageHelper {
}
String getWarnings(String existing) {
if (existing != null)
warnings.add(0, existing);
if (existing != null) {
boolean exists = false;
for (String warning : warnings)
if (existing.equals(warning)) {
exists = true;
break;
}
if (!exists)
warnings.add(0, existing);
}
if (warnings.size() == 0)
return null;
else