Skip to content

Commit

Permalink
Временная замена получения конфигурации с fork.join на get
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Jan 2, 2022
1 parent 15e37f5 commit 07da734
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 07da734

Please sign in to comment.