File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -182,22 +182,23 @@ public void stop() {
182
182
* @param remainingScans the number of remaining scans
183
183
*/
184
184
void stopAfter (int remainingScans ) {
185
+ Thread thread = null ;
185
186
synchronized (this .monitor ) {
186
- Thread thread = this .watchThread ;
187
+ thread = this .watchThread ;
187
188
if (thread != null ) {
188
189
this .remainingScans .set (remainingScans );
189
190
if (remainingScans <= 0 ) {
190
191
thread .interrupt ();
191
192
}
192
- if ( Thread . currentThread () != thread ) {
193
- try {
194
- thread . join ();
195
- }
196
- catch ( InterruptedException ex ) {
197
- Thread . currentThread (). interrupt ();
198
- }
199
- }
200
- this . watchThread = null ;
193
+ }
194
+ this . watchThread = null ;
195
+ }
196
+ if ( Thread . currentThread () != thread ) {
197
+ try {
198
+ thread . join ();
199
+ }
200
+ catch ( InterruptedException ex ) {
201
+ Thread . currentThread (). interrupt () ;
201
202
}
202
203
}
203
204
}
You can’t perform that action at this time.
0 commit comments