Use Path.of() instead of Paths.get()
Path.of() makes Paths.get() obsolete in Java 11
Change-Id: Ie3cda479e3af5f1bb7a36a25c5095783ec750ca5
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java
index afd189d..f415e90 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java
@@ -22,7 +22,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
@@ -49,7 +48,7 @@
String v = config.getString("hooks", null, "path");
if (v != null) {
- this.hooksPath = Paths.get(v);
+ this.hooksPath = Path.of(v);
} else {
this.hooksPath = sitePaths.hooks_dir;
}