From c35194970f8cb25fd5775dd172bed151d7abe5ac Mon Sep 17 00:00:00 2001 From: Luke Hutchison Date: Wed, 2 Jun 2021 03:53:26 -0600 Subject: [PATCH] Code > Cleanup --- .../java/nonapi/io/github/classgraph/utils/FileUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java b/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java index 048ae1a30..7cf6a3cbc 100644 --- a/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java +++ b/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java @@ -103,7 +103,7 @@ public static String currDirPath() { // user.dir should be the current directory at the time the JVM is started, which is // where classpath elements should be resolved relative to Path path = null; - String currDirPathStr = System.getProperty("user.dir"); + final String currDirPathStr = System.getProperty("user.dir"); if (currDirPathStr != null) { try { path = Paths.get(currDirPathStr); @@ -120,7 +120,7 @@ public static String currDirPath() { // Fall through } } - + // Normalize current directory the same way all other paths are normalized in ClassGraph, // for consistency currDirPath = FastPathResolver.resolve(path == null ? "" : path.toString());