mirror of
https://github.com/corda/corda.git
synced 2025-05-28 21:24:24 +00:00
Fixed isJar checks.
This commit is contained in:
parent
a8d73fb73f
commit
f46cbd32c6
@ -39,11 +39,15 @@ public class CordaCaplet extends Capsule {
|
|||||||
|
|
||||||
File[] files = dir.listFiles();
|
File[] files = dir.listFiles();
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
Boolean isJAR = FilenameUtils.getExtension(file.getName()).toLowerCase() == "jar";
|
if (file.isFile() && isJAR(file)) {
|
||||||
if (file.isFile() && isJAR) {
|
|
||||||
classpath.add(file.toPath().toAbsolutePath());
|
classpath.add(file.toPath().toAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return classpath;
|
return classpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Boolean isJAR(File file) {
|
||||||
|
String[] parts = file.getName().split("\\.");
|
||||||
|
return (parts.length > 1) && (parts[parts.length - 1].toLowerCase().equals("jar"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user