project configuration: avoid infinite loops when deleting library root

Avoid infinite loop even if 'Library.ModifiableModel::removeRoot' always returns true because of a bug (see IDEA-182159). If there are several identical roots in a library it should be ok to remove them one by one.
This commit is contained in:
nik
2017-11-20 18:05:07 +03:00
parent ea70f3223a
commit 3a79d231f0
@@ -189,11 +189,7 @@ public class ExistingLibraryEditor extends LibraryEditorBase implements Disposab
@Override
public void removeRoot(@NotNull String url, @NotNull OrderRootType rootType) {
boolean removed;
do {
removed = getModel().removeRoot(url, rootType);
}
while (removed);
getModel().removeRoot(url, rootType);
}
@Override