From 07da7344c3d6463fc2ec475c76d0909c6b50a2bb Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Sun, 2 Jan 2022 15:16:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D1=81=20fork.join=20=D0=BD=D0=B0=20get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bsl/languageserver/context/ServerContext.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java index 18d0ee9e650..a4e706afeda 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java @@ -190,12 +190,16 @@ private Configuration computeConfigurationMetadata() { } Configuration configuration; - ForkJoinPool customThreadPool = new ForkJoinPool(); + var customThreadPool = new ForkJoinPool(); try { - configuration = customThreadPool.submit(() -> Configuration.create(configurationRoot)).fork().join(); - } catch (RuntimeException e) { + configuration = customThreadPool.submit(() -> Configuration.create(configurationRoot)).get(); + } catch (ExecutionException e) { LOGGER.error("Can't parse configuration metadata. Execution exception.", e); configuration = Configuration.create(); + } catch (InterruptedException e) { + LOGGER.error("Can't parse configuration metadata. Interrupted exception.", e); + configuration = Configuration.create(); + Thread.currentThread().interrupt(); } return configuration;