fix for NPE

This commit is contained in:
Greg DiCristofaro 2024-05-08 11:33:03 -04:00
parent 1e9028d0be
commit e36d6f83e9

View File

@ -2823,12 +2823,15 @@ public class Case {
Throwable curEx = ex; Throwable curEx = ex;
// max depth search for a concurrent db access exception will be 10 // max depth search for a concurrent db access exception will be 10
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
if (curEx instanceof ConcurrentDbAccessException foundEx) { if (curEx == null) {
break;
} else if (curEx instanceof ConcurrentDbAccessException foundEx) {
concurrentEx = foundEx; concurrentEx = foundEx;
break; break;
} } else {
curEx = curEx.getCause(); curEx = curEx.getCause();
} }
}
if (concurrentEx != null) { if (concurrentEx != null) {
throw new CaseActionException(Bundle.Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException( throw new CaseActionException(Bundle.Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException(