You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2020/06/16 20:23:02 UTC

[netbeans] branch master updated: [NETBEANS-2790] Do not throw ClosedWatchServiceException on Shutdown.

This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 1cd99db  [NETBEANS-2790] Do not throw ClosedWatchServiceException on Shutdown.
1cd99db is described below

commit 1cd99dbca51a46c570a67a41ce9e8238c4d8e48e
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Tue Jun 9 17:07:00 2020 -0700

    [NETBEANS-2790] Do not throw ClosedWatchServiceException on Shutdown.
---
 platform/masterfs.nio2/nbproject/project.properties                   | 2 +-
 .../src/org/netbeans/modules/masterfs/watcher/nio2/NioNotifier.java   | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/platform/masterfs.nio2/nbproject/project.properties b/platform/masterfs.nio2/nbproject/project.properties
index 6de45e1..0f73a11 100644
--- a/platform/masterfs.nio2/nbproject/project.properties
+++ b/platform/masterfs.nio2/nbproject/project.properties
@@ -15,5 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 is.autoload=true
-javac.source=1.6
+javac.source=1.8
 javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/platform/masterfs.nio2/src/org/netbeans/modules/masterfs/watcher/nio2/NioNotifier.java b/platform/masterfs.nio2/src/org/netbeans/modules/masterfs/watcher/nio2/NioNotifier.java
index 4089eba..0e0086a 100644
--- a/platform/masterfs.nio2/src/org/netbeans/modules/masterfs/watcher/nio2/NioNotifier.java
+++ b/platform/masterfs.nio2/src/org/netbeans/modules/masterfs/watcher/nio2/NioNotifier.java
@@ -61,7 +61,9 @@ public class NioNotifier extends Notifier<WatchKey> {
         try {
             key.cancel();
         } catch (ClosedWatchServiceException ex) {
-            throw new IOException(ex);
+            // This happens on shutdown as watcher service can be closed before
+            // all watches are removed from it. It is safe to swallow this
+            // exception here.
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists