mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
when accessing index data handle IOExceptions wrapped with RuntimeException
This commit is contained in:
@@ -365,14 +365,23 @@ public class StubUpdatingIndex extends CustomImplementationFileBasedIndexExtensi
|
||||
indexStorage = memIndexStorage.getBackendStorage();
|
||||
}
|
||||
}
|
||||
final ValueContainer<SerializedStubTree> valueContainer = indexStorage.read(key);
|
||||
if (valueContainer.size() != 1) {
|
||||
LOG.assertTrue(valueContainer.size() == 0);
|
||||
try {
|
||||
final ValueContainer<SerializedStubTree> valueContainer = indexStorage.read(key);
|
||||
if (valueContainer.size() != 1) {
|
||||
LOG.assertTrue(valueContainer.size() == 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
result.put(key, valueContainer.getValueIterator().next());
|
||||
return result;
|
||||
}
|
||||
|
||||
result.put(key, valueContainer.getValueIterator().next());
|
||||
return result;
|
||||
catch (RuntimeException e) {
|
||||
final Throwable cause = e.getCause();
|
||||
if (cause instanceof IOException) {
|
||||
throw new StorageException(cause);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() throws StorageException {
|
||||
|
||||
Reference in New Issue
Block a user