From 48d296ac0c55b62385a7806407d23d367d6309d4 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 3 Mar 2021 08:38:15 -0600 Subject: [PATCH] Issue #6021 - Addressing naming Signed-off-by: Joakim Erdfelt --- .../org/eclipse/jetty/xml/XmlConfiguration.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index c192ea80756..ae876e62d03 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -28,7 +28,6 @@ import java.net.InetAddress; import java.net.MalformedURLException; import java.net.URL; import java.net.UnknownHostException; -import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.security.AccessController; @@ -333,18 +332,19 @@ public class XmlConfiguration } /** - * Utility method to resolve a provided path against a base directory. + * Utility method to resolve a provided path against a directory. * - * @param baseDir the base directory - * @param destPath the destination path (can be relative or absolute, syntax depends on OS + FileSystem in use) + * @param dir the directory (should be a directory reference, does not have to exist) + * @param destPath the destination path (can be relative or absolute, syntax depends on OS + FileSystem in use, + * and does not need to exist) * @return String to resolved and normalized path, or null if baseDir or destPath is empty. */ - public static String resolvePath(String baseDir, String destPath) + public static String resolvePath(String dir, String destPath) { - if (StringUtil.isEmpty(baseDir) || StringUtil.isEmpty(destPath)) + if (StringUtil.isEmpty(dir) || StringUtil.isEmpty(destPath)) return null; - return Paths.get(baseDir).resolve(destPath).normalize().toString(); + return Paths.get(dir).resolve(destPath).normalize().toString(); } private static class JettyXmlConfiguration implements ConfigurationProcessor