static AutoCloseable serverSocketFactory_autoUpdate(IF0 enter default null) { temp new CloseablesHolder resources; new FileWatchService watchService; resources.add(watchService); File dir = mkdirs(javaxSecretDir()); watchService.addRecursiveListener(dir, f -> { temp getVar(enter); if (fileNameIs(f, "keystore.p12")) { print("Key store changed, reloading certificates: " + f); serverSocketFactory_botCompanyEtc_update(); } }); print("Watching " + dir + " for keystore changes"); ret resources.takeOut(watchService); }