Skip to content

Commit 01e0895

Browse files
committed
ThreadQueue : check value to avoid NPE
1 parent 86131f0 commit 01e0895

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/javaforce/ThreadQueue.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ public ThreadQueue(int minThreads, int maxThreads, int idleSeconds) {
6969

7070
/** Closes the ThreadQueue (the queue is first emptied) */
7171
public void close() {
72-
executor.shutdown();
73-
executor = null;
72+
if (executor != null) {
73+
executor.shutdown();
74+
executor = null;
75+
}
7476
queue = null;
7577
}
7678

0 commit comments

Comments
 (0)