mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
no need to rethrow InvalidDataException as RuntimeException
This commit is contained in:
+11
-16
@@ -69,23 +69,18 @@ public abstract class LibraryTableBase implements PersistentStateComponent<Eleme
|
||||
|
||||
@Override
|
||||
public void loadState(final Element element) {
|
||||
try {
|
||||
if (myFirstLoad) {
|
||||
myModel.readExternal(element);
|
||||
}
|
||||
else {
|
||||
LibraryModel model = new LibraryModel(myModel);
|
||||
WriteAction.run(() -> {
|
||||
model.readExternal(element);
|
||||
commit(model);
|
||||
});
|
||||
}
|
||||
if (myFirstLoad) {
|
||||
myModel.readExternal(element);
|
||||
}
|
||||
else {
|
||||
LibraryModel model = new LibraryModel(myModel);
|
||||
WriteAction.run(() -> {
|
||||
model.readExternal(element);
|
||||
commit(model);
|
||||
});
|
||||
}
|
||||
|
||||
myFirstLoad = false;
|
||||
}
|
||||
catch (InvalidDataException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
myFirstLoad = false;
|
||||
}
|
||||
|
||||
public long getStateModificationCount() {
|
||||
|
||||
Reference in New Issue
Block a user