ben-manes / caffeine

Possible null access due to exception handling JAVA-E1084
Bug risk
Critical
3 occurrences in this check
pacer may be null at this point due to being assigned/assumed null if an exception is not thrown
1666    var pacer = pacer();
1667    if ((pacer != null) && !pacer.isScheduled() && evictionLock.tryLock()) {
1668      try {
1669        if ((drainStatusOpaque() == REQUIRED) && !pacer.isScheduled()) {1670          pacer.schedule(executor, drainBuffersTask, expirationTicker().read(), Pacer.TOLERANCE);
1671        }
1672      } finally {
pacer may be null at this point due to being assigned/assumed null if an exception is not thrown
1666    var pacer = pacer();
1667    if ((pacer != null) && !pacer.isScheduled() && evictionLock.tryLock()) {
1668      try {
1669        if ((drainStatusOpaque() == REQUIRED) && !pacer.isScheduled()) {1670          pacer.schedule(executor, drainBuffersTask, expirationTicker().read(), Pacer.TOLERANCE);
1671        }
1672      } finally {
pacer may be null at this point due to being assigned/assumed null if an exception is not thrown
1667    if ((pacer != null) && !pacer.isScheduled() && evictionLock.tryLock()) {
1668      try {
1669        if ((drainStatusOpaque() == REQUIRED) && !pacer.isScheduled()) {
1670          pacer.schedule(executor, drainBuffersTask, expirationTicker().read(), Pacer.TOLERANCE);1671        }
1672      } finally {
1673        evictionLock.unlock();