This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-logging.git
The following commit(s) were added to refs/heads/master by this push: new bc3c546 Camel-case parameter and internal names bc3c546 is described below commit bc3c5461a4075c30b0121ce6fe3045c5af72e26e Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Oct 19 08:37:35 2023 -0400 Camel-case parameter and internal names Spelling --- .../org/apache/commons/logging/LogFactory.java | 6 +++--- .../commons/logging/PathableClassLoader.java | 24 +++++++++++----------- .../logging/pathable/ChildFirstTestCase.java | 2 +- .../logging/pathable/ParentFirstTestCase.java | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java index 05f1365..79943d9 100644 --- a/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/src/main/java/org/apache/commons/logging/LogFactory.java @@ -1061,8 +1061,8 @@ public abstract class LogFactory { } /** - * Given a filename, return an enumeration of URLs pointing to - * all the occurrences of that filename in the classpath. + * Given a file name, return an enumeration of URLs pointing to + * all the occurrences of that file name in the classpath. * <p> * This is just like ClassLoader.getResources except that the * operation is done under an AccessController so that this method will @@ -1205,7 +1205,7 @@ public abstract class LogFactory { * Determines whether the user wants internal diagnostic output. If so, * returns an appropriate writer object. Users can enable diagnostic * output by setting the system property named {@link #DIAGNOSTICS_DEST_PROPERTY} to - * a filename, or the special values STDOUT or STDERR. + * a file name, or the special values STDOUT or STDERR. */ private static PrintStream initDiagnostics() { String dest; diff --git a/src/test/java/org/apache/commons/logging/PathableClassLoader.java b/src/test/java/org/apache/commons/logging/PathableClassLoader.java index d5957c8..b145ec1 100644 --- a/src/test/java/org/apache/commons/logging/PathableClassLoader.java +++ b/src/test/java/org/apache/commons/logging/PathableClassLoader.java @@ -118,15 +118,15 @@ public class PathableClassLoader extends URLClassLoader { */ public void addLogicalLib(final String logicalLib) { // first, check the system properties - final String filename = System.getProperty(logicalLib); - if (filename != null) { + final String fileName = System.getProperty(logicalLib); + if (fileName != null) { try { - final URL libUrl = new File(filename).toURL(); + final URL libUrl = new File(fileName).toURL(); addURL(libUrl); return; } catch (final java.net.MalformedURLException e) { throw new UnknownError( - "Invalid file [" + filename + "] for logical lib [" + logicalLib + "]"); + "Invalid file [" + fileName + "] for logical lib [" + logicalLib + "]"); } } @@ -253,7 +253,7 @@ public class PathableClassLoader extends URLClassLoader { * of {@code file:///some/where/foo-2.7.jar}. * <p> * When multiple classpath entries match the specified logicalLib string, - * the one with the shortest filename component is returned. This means that + * the one with the shortest file name component is returned. This means that * if "foo-1.1.jar" and "foobar-1.1.jar" are in the path, then a logicalLib * name of "foo" will match the first entry above. */ @@ -268,22 +268,22 @@ public class PathableClassLoader extends URLClassLoader { URL shortestMatch = null; int shortestMatchLen = Integer.MAX_VALUE; for (final URL u : path) { - // extract the filename bit on the end of the url - String filename = u.toString(); - if (!filename.endsWith(".jar")) { + // extract the file name bit on the end of the URL + String fileName = u.toString(); + if (!fileName.endsWith(".jar")) { // not a jarfile, ignore it continue; } - final int lastSlash = filename.lastIndexOf('/'); + final int lastSlash = fileName.lastIndexOf('/'); if (lastSlash >= 0) { - filename = filename.substring(lastSlash+1); + fileName = fileName.substring(lastSlash+1); } // ok, this is a candidate - if (filename.startsWith(logicalLib) && filename.length() < shortestMatchLen) { + if (fileName.startsWith(logicalLib) && fileName.length() < shortestMatchLen) { shortestMatch = u; - shortestMatchLen = filename.length(); + shortestMatchLen = fileName.length(); } } diff --git a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java index a4a7f0d..52ad608 100644 --- a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java @@ -225,7 +225,7 @@ public class ChildFirstTestCase extends TestCase { // getResource where it is accessable to both classloaders. The one visible // to the child should be returned. The URL returned will be of form - // jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname + // jar:file:/x/y.jar!path/to/resource. The file name part should include the jarname // of form commons-logging-adapters-nnnn.jar, not commons-logging-nnnn.jar resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class"); assertNotNull("Unable to locate Log4JLogger.class resource", resource); diff --git a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java index 8a4c937..c5016f7 100644 --- a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java @@ -223,7 +223,7 @@ public class ParentFirstTestCase extends TestCase { // getResource where it is accessable to both classloaders. The one visible // to the parent should be returned. The URL returned will be of form - // jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname + // jar:file:/x/y.jar!path/to/resource. The file name part should include the jarname // of form commons-logging-nnnn.jar, not commons-logging-adapters-nnnn.jar resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class"); assertNotNull("Unable to locate Log4JLogger.class resource", resource);