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) {
// 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 + "]");
}
}
@@ -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();
}
}