From 6ca4c79063fed14080681e8b73fc1849c0ac596d Mon Sep 17 00:00:00 2001 From: Hector Caballero Date: Mon, 29 Jan 2018 20:31:47 -0500 Subject: [PATCH] GC: Simplify expression Avoid converting path to file to then reconvert it to path. Signed-off-by: Hector Oswaldo Caballero Change-Id: I6a8c3ca9b83bf9b0eead9506938f5d68b27a76f5 --- .../src/org/eclipse/jgit/internal/storage/file/GC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index fd906c919..0c9328a8f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -954,7 +954,7 @@ public class GC { } else { if (base == null || !n.startsWith(base)) { try { - Files.delete(FileUtils.toPath(new File(packDir.toFile(), n))); + Files.delete(packDir.resolve(n)); } catch (IOException e) { LOG.error(e.getMessage(), e); }