From 52c4d09efa3357702bd50eba65c50a434250adb5 Mon Sep 17 00:00:00 2001 From: Jake W Date: Sun, 5 Nov 2023 08:55:01 +0800 Subject: [PATCH] Suppressed ClosedWatchServiceException and updated Java of Archetypes to 11 (#231) Fixes #188 Co-authored-by: Dmitrii Tikhomirov --- .../src/main/java/com/vertispan/j2cl/build/DiskCache.java | 8 ++++++++ j2cl-archetypes/pom.xml | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build-caching/src/main/java/com/vertispan/j2cl/build/DiskCache.java b/build-caching/src/main/java/com/vertispan/j2cl/build/DiskCache.java index 8044ee92..472ca49e 100644 --- a/build-caching/src/main/java/com/vertispan/j2cl/build/DiskCache.java +++ b/build-caching/src/main/java/com/vertispan/j2cl/build/DiskCache.java @@ -170,6 +170,14 @@ private void checkForWork() { } catch (IOException e) { // disaster, can't interact with the cache, stop and give up // TODO mark all pending work as canceled? + } catch (ClosedWatchServiceException e) { + if(!livenessThread.getState().equals(Thread.State.TERMINATED)) { + throw new Error(e); + } + + // This is purely noise in the log and doesn't indicate an actual + // error, so it can be safely ignored. Please see: + // https://github.com/Vertispan/j2clmavenplugin/issues/188 } } diff --git a/j2cl-archetypes/pom.xml b/j2cl-archetypes/pom.xml index f4032f20..daf1322a 100644 --- a/j2cl-archetypes/pom.xml +++ b/j2cl-archetypes/pom.xml @@ -16,9 +16,8 @@ Maven project archetypes for using J2CL - - 1.8 - 1.8 + 11 + 11