openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [openwebbeans-meecrowave] branch master updated: MEECROWAVE-219 patch from Killian Matt to close WatchService in reload on change controller
Date Tue, 29 Oct 2019 05:01:23 GMT
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 <rmannibucau@apache.org>
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() {


Mime
View raw message