This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans-meecrowave.git
The following commit(s) were added to refs/heads/master by this push:
new 02cc9ad MEECROWAVE-219 patch from Killian Matt to close WatchService
in reload on change controller
02cc9ad is described below
commit 02cc9ad48cf644739de053a09ea9823a230be1d3
Author: Romain Manni-Bucau <[email protected]>
AuthorDate: Tue Oct 29 06:01:12 2019 +0100
MEECROWAVE-219 patch from Killian Matt to close WatchService in reload on
change controller
---
.../org/apache/meecrowave/watching/ReloadOnChangeController.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
b/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
index e76816a..0a34601 100644
---
a/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
+++
b/meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java
@@ -103,6 +103,14 @@ public class ReloadOnChangeController implements
AutoCloseable, Runnable {
Thread.interrupted();
}
}
+ if (watchService != null) {
+ try {
+ watchService.close();
+ } catch (final IOException ex) {
+ new LogFacade(ReloadOnChangeController.class.getName())
+ .warn(ex.getMessage(), ex);
+ }
+ }
}
public boolean shouldRun() {