1
0

Camel-case parameter and internal names

Spelling
This commit is contained in:
Gary Gregory
2023-10-19 08:37:35 -04:00
parent 73582f2c71
commit bc3c5461a4
4 changed files with 17 additions and 17 deletions

View File

@@ -118,15 +118,15 @@ public class PathableClassLoader extends URLClassLoader {
*/ */
public void addLogicalLib(final String logicalLib) { public void addLogicalLib(final String logicalLib) {
// first, check the system properties // first, check the system properties
final String filename = System.getProperty(logicalLib); final String fileName = System.getProperty(logicalLib);
if (filename != null) { if (fileName != null) {
try { try {
final URL libUrl = new File(filename).toURL(); final URL libUrl = new File(fileName).toURL();
addURL(libUrl); addURL(libUrl);
return; return;
} catch (final java.net.MalformedURLException e) { } catch (final java.net.MalformedURLException e) {
throw new UnknownError( throw new UnknownError(
"Invalid file [" + filename + "] for logical lib [" + logicalLib + "]"); "Invalid file [" + fileName + "] for logical lib [" + logicalLib + "]");
} }
} }
@@ -268,22 +268,22 @@ public class PathableClassLoader extends URLClassLoader {
URL shortestMatch = null; URL shortestMatch = null;
int shortestMatchLen = Integer.MAX_VALUE; int shortestMatchLen = Integer.MAX_VALUE;
for (final URL u : path) { for (final URL u : path) {
// extract the filename bit on the end of the url // extract the file name bit on the end of the URL
String filename = u.toString(); String fileName = u.toString();
if (!filename.endsWith(".jar")) { if (!fileName.endsWith(".jar")) {
// not a jarfile, ignore it // not a jarfile, ignore it
continue; continue;
} }
final int lastSlash = filename.lastIndexOf('/'); final int lastSlash = fileName.lastIndexOf('/');
if (lastSlash >= 0) { if (lastSlash >= 0) {
filename = filename.substring(lastSlash+1); fileName = fileName.substring(lastSlash+1);
} }
// ok, this is a candidate // ok, this is a candidate
if (filename.startsWith(logicalLib) && filename.length() < shortestMatchLen) { if (fileName.startsWith(logicalLib) && fileName.length() < shortestMatchLen) {
shortestMatch = u; shortestMatch = u;
shortestMatchLen = filename.length(); shortestMatchLen = fileName.length();
} }
} }