File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io/monitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,8 +154,7 @@ public synchronized void stop() throws Exception {
154154 * Stop monitoring.
155155 *
156156 * @param stopInterval the amount of time in milliseconds to wait for the thread to finish.
157- * A value of zero will wait until the thread is finished (see {@link Thread#join(long)})
158- * and a negative value will stop the process immediately).
157+ * A value of zero will wait until the thread is finished (see {@link Thread#join(long)}).
159158 * @throws Exception if an error occurs initializing the observer
160159 * @since Commons IO 2.1
161160 */
@@ -165,11 +164,7 @@ public synchronized void stop(long stopInterval) throws Exception {
165164 }
166165 running = false ;
167166 try {
168- if (stopInterval < 0 ) {
169- thread .interrupt ();
170- } else {
171- thread .join (stopInterval );
172- }
167+ thread .join (stopInterval );
173168 } catch (InterruptedException e ) {
174169 Thread .currentThread ().interrupt ();
175170 }
You can’t perform that action at this time.
0 commit comments