Use Path.of() instead of Paths.get()

Path.of() makes Paths.get() obsolete in Java 11

Release-Notes: skip
Change-Id: I0e4433d9e37e09a11029c3e5d0a7eec32a0d5eb3
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/java/com/google/gerrit/asciidoctor/AsciiDoctor.java b/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
index 9d0a28e..25ed813 100644
--- a/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
+++ b/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -164,7 +164,7 @@
     if (bazel) {
       renderFiles(inputFiles, null);
     } else {
-      try (ZipOutputStream zip = new ZipOutputStream(Files.newOutputStream(Paths.get(zipFile)))) {
+      try (ZipOutputStream zip = new ZipOutputStream(Files.newOutputStream(Path.of(zipFile)))) {
         renderFiles(inputFiles, zip);
 
         File[] cssFiles = tmpdir.listFiles((dir, name) -> name.endsWith(".css"));
diff --git a/java/com/google/gerrit/asciidoctor/DocIndexer.java b/java/com/google/gerrit/asciidoctor/DocIndexer.java
index acd6aad..fd8161b 100644
--- a/java/com/google/gerrit/asciidoctor/DocIndexer.java
+++ b/java/com/google/gerrit/asciidoctor/DocIndexer.java
@@ -24,7 +24,7 @@
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.nio.file.Files;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.jar.JarEntry;
@@ -82,7 +82,7 @@
       return;
     }
 
-    try (JarOutputStream jar = new JarOutputStream(Files.newOutputStream(Paths.get(outFile)))) {
+    try (JarOutputStream jar = new JarOutputStream(Files.newOutputStream(Path.of(outFile)))) {
       byte[] compressedIndex = zip(index());
       JarEntry entry = new JarEntry(String.format("%s/%s", Constants.PACKAGE, Constants.INDEX_ZIP));
       entry.setSize(compressedIndex.length);
diff --git a/java/com/google/gerrit/httpd/init/SiteInitializer.java b/java/com/google/gerrit/httpd/init/SiteInitializer.java
index c59a8ed..f9f93e1 100644
--- a/java/com/google/gerrit/httpd/init/SiteInitializer.java
+++ b/java/com/google/gerrit/httpd/init/SiteInitializer.java
@@ -19,7 +19,6 @@
 import com.google.gerrit.pgm.init.BaseInit;
 import com.google.gerrit.pgm.init.PluginsDistribution;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.List;
 
 public final class SiteInitializer {
@@ -45,7 +44,7 @@
   public void init() {
     try {
       if (sitePath != null) {
-        Path site = Paths.get(sitePath);
+        Path site = Path.of(sitePath);
         logger.atInfo().log("Initializing site at %s", site.toRealPath().normalize());
 
         @SuppressWarnings("unused")
@@ -57,11 +56,11 @@
       String path = System.getProperty(GERRIT_SITE_PATH);
       Path site = null;
       if (!Strings.isNullOrEmpty(path)) {
-        site = Paths.get(path);
+        site = Path.of(path);
       }
 
       if (site == null && initPath != null) {
-        site = Paths.get(initPath);
+        site = Path.of(initPath);
       }
       if (site != null) {
         logger.atInfo().log("Initializing site at %s", site.toRealPath().normalize());
diff --git a/java/com/google/gerrit/httpd/init/WebAppInitializer.java b/java/com/google/gerrit/httpd/init/WebAppInitializer.java
index e1abcb1..fe4eb1c 100644
--- a/java/com/google/gerrit/httpd/init/WebAppInitializer.java
+++ b/java/com/google/gerrit/httpd/init/WebAppInitializer.java
@@ -132,7 +132,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -176,7 +175,7 @@
     if (manager == null) {
       String path = System.getProperty(GERRIT_SITE_PATH);
       if (path != null) {
-        sitePath = Paths.get(path);
+        sitePath = Path.of(path);
       } else {
         throw new ProvisionException(GERRIT_SITE_PATH + " must be defined");
       }
diff --git a/java/com/google/gerrit/httpd/raw/StaticModule.java b/java/com/google/gerrit/httpd/raw/StaticModule.java
index e056587..514712d 100644
--- a/java/com/google/gerrit/httpd/raw/StaticModule.java
+++ b/java/com/google/gerrit/httpd/raw/StaticModule.java
@@ -262,8 +262,7 @@
           // root directory
           warFs = null;
           unpackedWar =
-              java.nio.file.Paths.get(
-                  launcherLoadedFrom.getParentFile().getParentFile().getParentFile().toURI());
+              Path.of(launcherLoadedFrom.getParentFile().getParentFile().getParentFile().toURI());
           sourceRoot = null;
           development = false;
           return;
diff --git a/java/com/google/gerrit/launcher/GerritLauncher.java b/java/com/google/gerrit/launcher/GerritLauncher.java
index 07a071a..989c82b 100644
--- a/java/com/google/gerrit/launcher/GerritLauncher.java
+++ b/java/com/google/gerrit/launcher/GerritLauncher.java
@@ -36,7 +36,6 @@
 import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.security.CodeSource;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -706,7 +705,7 @@
     Path dir;
     String sourceRoot = System.getProperty("sourceRoot");
     if (sourceRoot != null) {
-      dir = Paths.get(sourceRoot);
+      dir = Path.of(sourceRoot);
       if (!Files.exists(dir)) {
         throw new FileNotFoundException("source root not found: " + dir);
       }
@@ -729,7 +728,7 @@
       }
 
       // Pop up to the top-level source folder by looking for WORKSPACE.
-      dir = Paths.get(u.getPath());
+      dir = Path.of(u.getPath());
       while (!Files.isRegularFile(dir.resolve("WORKSPACE"))) {
         Path parent = dir.getParent();
         if (parent == null) {
@@ -756,7 +755,7 @@
       Path rootPath = resolveInSourceRoot(".").normalize();
 
       Properties properties = loadBuildProperties(rootPath.resolve(".bazel_path"));
-      Path outputBase = Paths.get(properties.getProperty("output_base"));
+      Path outputBase = Path.of(properties.getProperty("output_base"));
 
       Path runtimeClasspath =
           rootPath.resolve("bazel-bin/tools/eclipse/main_classpath_collect.runtime_classpath");
diff --git a/java/com/google/gerrit/pgm/SwitchSecureStore.java b/java/com/google/gerrit/pgm/SwitchSecureStore.java
index 063fcdb..3cd0c47 100644
--- a/java/com/google/gerrit/pgm/SwitchSecureStore.java
+++ b/java/com/google/gerrit/pgm/SwitchSecureStore.java
@@ -31,7 +31,6 @@
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.List;
 import java.util.jar.JarFile;
@@ -63,7 +62,7 @@
   @Override
   public int run() throws Exception {
     SitePaths sitePaths = new SitePaths(getSitePath());
-    Path newSecureStorePath = Paths.get(newSecureStoreLib);
+    Path newSecureStorePath = Path.of(newSecureStoreLib);
     if (!Files.exists(newSecureStorePath)) {
       logger.atSevere().log("File %s doesn't exist", newSecureStorePath.toAbsolutePath());
       return -1;
diff --git a/java/com/google/gerrit/pgm/init/BaseInit.java b/java/com/google/gerrit/pgm/init/BaseInit.java
index abaefb2..1f56512 100644
--- a/java/com/google/gerrit/pgm/init/BaseInit.java
+++ b/java/com/google/gerrit/pgm/init/BaseInit.java
@@ -62,7 +62,6 @@
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.nio.file.SimpleFileVisitor;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.ArrayList;
@@ -313,7 +312,7 @@
       return null;
     }
 
-    Path secureStoreLib = Paths.get(secureStore);
+    Path secureStoreLib = Path.of(secureStore);
     if (!Files.exists(secureStoreLib)) {
       throw new InvalidSecureStoreException(String.format("File %s doesn't exist", secureStore));
     }
diff --git a/java/com/google/gerrit/pgm/init/InitAdminUser.java b/java/com/google/gerrit/pgm/init/InitAdminUser.java
index 3dce974..44ad96e 100644
--- a/java/com/google/gerrit/pgm/init/InitAdminUser.java
+++ b/java/com/google/gerrit/pgm/init/InitAdminUser.java
@@ -40,7 +40,6 @@
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -186,7 +185,7 @@
   @Nullable
   private AccountSshKey readSshKey(Account.Id id) throws IOException {
     String defaultPublicSshKeyFile = "";
-    Path defaultPublicSshKeyPath = Paths.get(System.getProperty("user.home"), ".ssh", "id_rsa.pub");
+    Path defaultPublicSshKeyPath = Path.of(System.getProperty("user.home"), ".ssh", "id_rsa.pub");
     if (Files.exists(defaultPublicSshKeyPath)) {
       defaultPublicSshKeyFile = defaultPublicSshKeyPath.toString();
     }
@@ -195,7 +194,7 @@
   }
 
   private AccountSshKey createSshKey(Account.Id id, String keyFile) throws IOException {
-    Path p = Paths.get(keyFile);
+    Path p = Path.of(keyFile);
     if (!Files.exists(p)) {
       throw new IOException(String.format("Cannot add public SSH key: %s is not a file", keyFile));
     }
diff --git a/java/com/google/gerrit/pgm/util/SiteProgram.java b/java/com/google/gerrit/pgm/util/SiteProgram.java
index ff0b31e..aeaa1d6 100644
--- a/java/com/google/gerrit/pgm/util/SiteProgram.java
+++ b/java/com/google/gerrit/pgm/util/SiteProgram.java
@@ -42,7 +42,6 @@
 import com.google.inject.util.Providers;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 import org.kohsuke.args4j.Option;
@@ -53,10 +52,10 @@
       aliases = {"-d"},
       usage = "Local directory containing site data")
   void setSitePath(String path) {
-    sitePath = Paths.get(path).normalize();
+    sitePath = Path.of(path).normalize();
   }
 
-  private Path sitePath = Paths.get(".");
+  private Path sitePath = Path.of(".");
 
   protected SiteProgram() {}
 
diff --git a/java/com/google/gerrit/server/config/GitwebCgiConfig.java b/java/com/google/gerrit/server/config/GitwebCgiConfig.java
index 1ed0f16..862b092 100644
--- a/java/com/google/gerrit/server/config/GitwebCgiConfig.java
+++ b/java/com/google/gerrit/server/config/GitwebCgiConfig.java
@@ -21,7 +21,6 @@
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import org.eclipse.jgit.lib.Config;
 
 @Singleton
@@ -48,7 +47,7 @@
     }
 
     String cfgCgi = cfg.getString("gitweb", null, "cgi");
-    Path pkgCgi = Paths.get("/usr/lib/cgi-bin/gitweb.cgi");
+    Path pkgCgi = Path.of("/usr/lib/cgi-bin/gitweb.cgi");
     String[] resourcePaths = {
       "/usr/share/gitweb/static", "/usr/share/gitweb", "/var/www/static", "/var/www",
     };
@@ -96,7 +95,7 @@
     Path js = null;
     Path logo = null;
     for (String path : resourcePaths) {
-      Path dir = Paths.get(path);
+      Path dir = Path.of(path);
       css = dir.resolve("gitweb.css");
       js = dir.resolve("gitweb.js");
       logo = dir.resolve("git-logo.png");
diff --git a/java/com/google/gerrit/server/config/RepositoryConfig.java b/java/com/google/gerrit/server/config/RepositoryConfig.java
index d569c87..c008f63 100644
--- a/java/com/google/gerrit/server/config/RepositoryConfig.java
+++ b/java/com/google/gerrit/server/config/RepositoryConfig.java
@@ -58,7 +58,7 @@
   @Nullable
   public Path getBasePath(Project.NameKey project) {
     String basePath = cfg.getString(SECTION_NAME, findSubSection(project.get()), BASE_PATH_NAME);
-    return basePath != null ? Paths.get(basePath) : null;
+    return basePath != null ? Path.of(basePath) : null;
   }
 
   public ImmutableList<Path> getAllBasePaths() {
diff --git a/java/com/google/gerrit/server/plugins/JarPluginProvider.java b/java/com/google/gerrit/server/plugins/JarPluginProvider.java
index 760631d..e64651d 100644
--- a/java/com/google/gerrit/server/plugins/JarPluginProvider.java
+++ b/java/com/google/gerrit/server/plugins/JarPluginProvider.java
@@ -30,7 +30,6 @@
 import java.net.URLClassLoader;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.time.Instant;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
@@ -131,7 +130,7 @@
       List<URL> urls = new ArrayList<>(2);
       String overlay = System.getProperty("gerrit.plugin-classes");
       if (overlay != null) {
-        Path classes = Paths.get(overlay).resolve(name).resolve("main");
+        Path classes = Path.of(overlay).resolve(name).resolve("main");
         if (Files.isDirectory(classes)) {
           logger.atInfo().log("plugin %s: including %s", name, classes);
           urls.add(classes.toUri().toURL());
diff --git a/java/com/google/gerrit/server/plugins/PluginLoader.java b/java/com/google/gerrit/server/plugins/PluginLoader.java
index e05cbc0..64050e2 100644
--- a/java/com/google/gerrit/server/plugins/PluginLoader.java
+++ b/java/com/google/gerrit/server/plugins/PluginLoader.java
@@ -48,7 +48,6 @@
 import java.nio.file.DirectoryStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.AbstractMap;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
@@ -716,7 +715,7 @@
                 + " another plugin <%s>"
                 + " with the same name <%s> already exists",
             loser, winner, plugin);
-        Path disabledPlugin = Paths.get(loser + ".disabled");
+        Path disabledPlugin = Path.of(loser + ".disabled");
         elementsToAdd.add(disabledPlugin);
         elementsToRemove.add(loser);
         try {
diff --git a/java/com/google/gerrit/server/restapi/config/GetSummary.java b/java/com/google/gerrit/server/restapi/config/GetSummary.java
index faa3871..5e76e06 100644
--- a/java/com/google/gerrit/server/restapi/config/GetSummary.java
+++ b/java/com/google/gerrit/server/restapi/config/GetSummary.java
@@ -33,7 +33,6 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
@@ -203,7 +202,7 @@
       // Ignored
     }
 
-    jvmSummary.currentWorkingDirectory = path(Paths.get(".").toAbsolutePath().getParent());
+    jvmSummary.currentWorkingDirectory = path(Path.of(".").toAbsolutePath().getParent());
     jvmSummary.site = path(sitePath);
     return jvmSummary;
   }
diff --git a/java/com/google/gerrit/testing/InMemoryModule.java b/java/com/google/gerrit/testing/InMemoryModule.java
index 0d5d4f5..fc045a5 100644
--- a/java/com/google/gerrit/testing/InMemoryModule.java
+++ b/java/com/google/gerrit/testing/InMemoryModule.java
@@ -16,7 +16,6 @@
 
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService;
-import static com.google.gerrit.server.Sequence.LightweightGroups;
 import static com.google.inject.Scopes.SINGLETON;
 
 import com.google.common.base.Strings;
@@ -47,6 +46,7 @@
 import com.google.gerrit.server.LibModuleType;
 import com.google.gerrit.server.PluginUser;
 import com.google.gerrit.server.Sequence;
+import com.google.gerrit.server.Sequence.LightweightGroups;
 import com.google.gerrit.server.account.AccountCacheImpl;
 import com.google.gerrit.server.account.GroupBackend;
 import com.google.gerrit.server.account.storage.notedb.AccountNoteDbReadStorageModule;
@@ -135,7 +135,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
@@ -228,7 +227,7 @@
 
     // It would be nice to use Jimfs for the SitePath, but the biggest blocker is that JGit does not
     // support Path-based Configs, only FileBasedConfig.
-    bind(Path.class).annotatedWith(SitePath.class).toInstance(Paths.get("."));
+    bind(Path.class).annotatedWith(SitePath.class).toInstance(Path.of("."));
     bind(Config.class).annotatedWith(GerritServerConfig.class).toInstance(cfg);
     bind(GerritOptions.class).toInstance(new GerritOptions(false, false));
     bind(AllProjectsConfigProvider.class).to(FileBasedAllProjectsConfigProvider.class);
diff --git a/javatests/com/google/gerrit/server/config/RepositoryConfigTest.java b/javatests/com/google/gerrit/server/config/RepositoryConfigTest.java
index d7aae6a0..d064cbd 100644
--- a/javatests/com/google/gerrit/server/config/RepositoryConfigTest.java
+++ b/javatests/com/google/gerrit/server/config/RepositoryConfigTest.java
@@ -21,7 +21,6 @@
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.client.SubmitType;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.List;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Before;
@@ -191,7 +190,7 @@
   public void allBasePath() {
     ImmutableList<Path> allBasePaths =
         ImmutableList.of(
-            Paths.get("/someBasePath1"), Paths.get("/someBasePath2"), Paths.get("/someBasePath2"));
+            Path.of("/someBasePath1"), Path.of("/someBasePath2"), Path.of("/someBasePath2"));
 
     configureBasePath("*", allBasePaths.get(0).toString());
     configureBasePath("project/*", allBasePaths.get(1).toString());
diff --git a/javatests/com/google/gerrit/server/config/SitePathsTest.java b/javatests/com/google/gerrit/server/config/SitePathsTest.java
index 1e5f41d..abeca79 100644
--- a/javatests/com/google/gerrit/server/config/SitePathsTest.java
+++ b/javatests/com/google/gerrit/server/config/SitePathsTest.java
@@ -23,7 +23,6 @@
 import java.nio.file.Files;
 import java.nio.file.NotDirectoryException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import org.junit.Test;
 
 public class SitePathsTest {
@@ -92,7 +91,7 @@
 
     final String pfx = HostPlatform.isWin32() ? "C:/" : "/";
     assertThat(site.resolve(pfx + "a")).isNotNull();
-    assertThat(site.resolve(pfx + "a")).isEqualTo(Paths.get(pfx + "a"));
+    assertThat(site.resolve(pfx + "a")).isEqualTo(Path.of(pfx + "a"));
   }
 
   private static Path random() throws IOException {
diff --git a/javatests/com/google/gerrit/server/git/MultiBaseLocalDiskRepositoryManagerTest.java b/javatests/com/google/gerrit/server/git/MultiBaseLocalDiskRepositoryManagerTest.java
index 700f205..5794149 100644
--- a/javatests/com/google/gerrit/server/git/MultiBaseLocalDiskRepositoryManagerTest.java
+++ b/javatests/com/google/gerrit/server/git/MultiBaseLocalDiskRepositoryManagerTest.java
@@ -25,7 +25,6 @@
 import com.google.gerrit.server.config.SitePaths;
 import java.io.IOException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.NavigableSet;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
 import org.eclipse.jgit.lib.Config;
@@ -156,7 +155,7 @@
         IllegalStateException.class,
         () -> {
           configMock = mock(RepositoryConfig.class);
-          when(configMock.getAllBasePaths()).thenReturn(ImmutableList.of(Paths.get("repos")));
+          when(configMock.getAllBasePaths()).thenReturn(ImmutableList.of(Path.of("repos")));
           repoManager = new MultiBaseLocalDiskRepositoryManager(site, cfg, configMock);
         });
   }
diff --git a/javatests/com/google/gerrit/server/mail/send/MailSoySauceLoaderTest.java b/javatests/com/google/gerrit/server/mail/send/MailSoySauceLoaderTest.java
index 7f893f1..412bd0f 100644
--- a/javatests/com/google/gerrit/server/mail/send/MailSoySauceLoaderTest.java
+++ b/javatests/com/google/gerrit/server/mail/send/MailSoySauceLoaderTest.java
@@ -20,7 +20,7 @@
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.plugincontext.PluginContext.PluginMetrics;
 import com.google.gerrit.server.plugincontext.PluginSetContext;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -31,7 +31,7 @@
 
   @Before
   public void setUp() throws Exception {
-    sitePaths = new SitePaths(Paths.get("."));
+    sitePaths = new SitePaths(Path.of("."));
     set = new DynamicSet<>();
   }
 
diff --git a/javatests/com/google/gerrit/server/mail/send/MailSoySauceModuleTest.java b/javatests/com/google/gerrit/server/mail/send/MailSoySauceModuleTest.java
index 5a6db42..ed179a7 100644
--- a/javatests/com/google/gerrit/server/mail/send/MailSoySauceModuleTest.java
+++ b/javatests/com/google/gerrit/server/mail/send/MailSoySauceModuleTest.java
@@ -33,7 +33,7 @@
 import com.google.inject.TypeLiteral;
 import com.google.inject.name.Names;
 import com.google.template.soy.jbcsrc.api.SoySauce;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import javax.inject.Provider;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Test;
@@ -41,7 +41,7 @@
 public class MailSoySauceModuleTest {
   @Test
   public void soySauceProviderReturnsCachedValue() throws Exception {
-    SitePaths sitePaths = new SitePaths(Paths.get("."));
+    SitePaths sitePaths = new SitePaths(Path.of("."));
     Injector injector =
         Guice.createInjector(
             new MailSoySauceModule(),
diff --git a/javatests/com/google/gerrit/server/schema/NoteDbSchemaVersionCheckTest.java b/javatests/com/google/gerrit/server/schema/NoteDbSchemaVersionCheckTest.java
index e265623..2c9aad4 100644
--- a/javatests/com/google/gerrit/server/schema/NoteDbSchemaVersionCheckTest.java
+++ b/javatests/com/google/gerrit/server/schema/NoteDbSchemaVersionCheckTest.java
@@ -24,7 +24,7 @@
 import com.google.gerrit.testing.InMemoryRepositoryManager;
 import com.google.inject.ProvisionException;
 import java.io.IOException;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Before;
 import org.junit.Test;
@@ -41,7 +41,7 @@
     versionManager = new NoteDbSchemaVersionManager(allProjectsName, repoManager);
     testRefAction(() -> versionManager.init());
 
-    sitePaths = new SitePaths(Paths.get("/tmp/foo"));
+    sitePaths = new SitePaths(Path.of("/tmp/foo"));
   }
 
   @Test
diff --git a/plugins/delete-project b/plugins/delete-project
index 01a35c8..f046ac6 160000
--- a/plugins/delete-project
+++ b/plugins/delete-project
@@ -1 +1 @@
-Subproject commit 01a35c85680bda3bb724f9bf0b266ad36c6dd0e9
+Subproject commit f046ac6773ea1c6e10b5e95b763ae685c24ec7f1
diff --git a/plugins/hooks b/plugins/hooks
index 3007362..f975f91 160000
--- a/plugins/hooks
+++ b/plugins/hooks
@@ -1 +1 @@
-Subproject commit 30073628612bce23826f4be71bfdd159da521cbc
+Subproject commit f975f914312b258f84957d19f96014c3edd12644
diff --git a/plugins/plugin-manager b/plugins/plugin-manager
index ba74d49..cdd2d2d 160000
--- a/plugins/plugin-manager
+++ b/plugins/plugin-manager
@@ -1 +1 @@
-Subproject commit ba74d4969462c2592bcf97868dd76c33041d47b2
+Subproject commit cdd2d2d69666a70a16ac02bacf8e7fbbf4ca9979