]> source.dussan.org Git - jgit.git/commitdiff
GC: Simplify expression 81/116781/1
authorHector Caballero <hector.caballero@ericsson.com>
Tue, 30 Jan 2018 01:31:47 +0000 (20:31 -0500)
committerHector Caballero <hector.caballero@ericsson.com>
Tue, 6 Feb 2018 11:25:32 +0000 (06:25 -0500)
Avoid converting path to file to then reconvert it to path.

Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: I6a8c3ca9b83bf9b0eead9506938f5d68b27a76f5

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java

index fd906c919277e8b52bd1b972d1753d50fb2ca9d8..0c9328a8f310a456115edb8e9cd4fdf6a98a5007 100644 (file)
@@ -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);
                                        }