mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
+1
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user