Fix the bug that SpiLoader#closeResources may not record the exception when error occurs (#2890)
This commit is contained in:
parent
e13d20ce55
commit
5864ab577f
|
|
@ -505,7 +505,7 @@ public final class SpiLoader<S> {
|
||||||
try {
|
try {
|
||||||
closeable.close();
|
closeable.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (firstException != null) {
|
if (firstException == null) {
|
||||||
firstException = e;
|
firstException = e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue