mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert LibraryTableBase changes to fix tests, will investigate l8r
This commit is contained in:
+13
-13
@@ -136,19 +136,19 @@ public abstract class LibraryTableBase implements PersistentStateComponent<Eleme
|
||||
}
|
||||
|
||||
// dispose newly created instances of same (equals()) libraries
|
||||
for (final Library library : model.myLibraries) {
|
||||
if (addedLibraries.contains(library)) continue;
|
||||
for (final Library oldLibrary : myModel.myLibraries) {
|
||||
if (library.equals(oldLibrary) && library != oldLibrary) {
|
||||
final int index = model.myLibraries.indexOf(library);
|
||||
Disposer.dispose(library);
|
||||
|
||||
// keep old library if somebody cached old instance
|
||||
model.myLibraries.set(index, oldLibrary);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//for (final Library library : model.myLibraries) {
|
||||
// if (addedLibraries.contains(library)) continue;
|
||||
// for (final Library oldLibrary : myModel.myLibraries) {
|
||||
// if (library.equals(oldLibrary) && library != oldLibrary) {
|
||||
// final int index = model.myLibraries.indexOf(library);
|
||||
// Disposer.dispose(library);
|
||||
//
|
||||
// // keep old library if somebody cached old instance
|
||||
// model.myLibraries.set(index, oldLibrary);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
myModel = model;
|
||||
for (Library library : removedLibraries) {
|
||||
|
||||
Reference in New Issue
Block a user