mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-26298 EA-107209 Return empty list in case of exception instead of null
It's not the best idea to suppress exceptions (logged) like that, but PyPackageManager itself works this way at the moment by caching an empty list of packages after the first error. It also releases the clients of refreshAndGetPackages() of burden of handling these (presumably rare) exceptions on their own.
This commit is contained in:
@@ -308,6 +308,7 @@ public class PyPackageUtil {
|
||||
packagesRef.set(manager.refreshAndGetPackages(false));
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
packagesRef.set(Collections.emptyList());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
e.initCause(callStacktrace);
|
||||
LOG.debug(e);
|
||||
|
||||
Reference in New Issue
Block a user