[FIX] ArrayIndexOutOfBoundsException if xorConfict is empty

This commit is contained in:
Sevastjan 2023-07-20 05:31:16 +03:00
parent aed383b1fb
commit ab7487872c
No known key found for this signature in database
GPG key ID: A18133AD7A67B8AB

View file

@ -165,7 +165,7 @@ public void disable(OptionalFile file, BiConsumer<OptionalFile, Boolean> callbac
}
}
}
if (file.xorConflict != null) {
if (file.xorConflict != null && file.xorConflict.length != 0) {
if (Arrays.stream(file.xorConflict).noneMatch(this::isEnabled)) {
enable(file.xorConflict[0], false, callback);
}